pamiller21
Enthusiast
Enthusiast

Get-Folder vCLS

Jump to solution

Hey all,

I am trying to get powercli to find all the vCLS VMs, but when I try to "Get-Folder 'vCLS' | Get-VM" it says:

Get-Folder: 3/9/2022 9:56:22 AM Get-Folder Folder with name 'vCLS' was not found using the specified filter(s).

When there is clearly a folder named vCLS.  What am I missing?

Thanks,
Andy

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

That is exactly the same environment I tested in.

Is it only for that one user?
Or are there other users that experience the same?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Tags (1)
0 Kudos
8 Replies
LucD
Leadership
Leadership

When you just do Get-Folder, does it include a folder named 'vCLS'?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
pamiller21
Enthusiast
Enthusiast

No it's missing there too

0 Kudos
LucD
Leadership
Leadership

Seems to be working for me.
Which vSphere version and which PowerCLI version are you using?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
LucD
Leadership
Leadership

And is the account you are using a member of the Administrators group?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
pamiller21
Enthusiast
Enthusiast

The user is admin under the global permissions.  I am running 7.0.3 build number 19234570

PowerCLI Version
----------------
VMware.PowerCLI 12.5.0 build 19195797
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.5 build 19093563
VMware Cis Core PowerCLI Component PowerCLI Component 12.5 build 19093567
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.5 build 19093566
VMware VimAutomation Srm PowerCLI Component PowerCLI Component 12.3 build 17843071
VMware VimAutomation License PowerCLI Component PowerCLI Component 12.0 build 15939670
VMware VimAutomation Storage PowerCLI Component PowerCLI Component 12.5 build 19106817
VMware VimAutomation Vds Commands PowerCLI Component PowerCLI Component 12.5 build 19167830
VMware CloudServices PowerCLI Component PowerCLI Component 12.5 build 19167829
VMware Vmc PowerCLI Component PowerCLI Component 12.5 build 19167827
VMware Nsxt PowerCLI Component PowerCLI Component 12.5 build 19168180
VMware VimAutomation vROps PowerCLI Component PowerCLI Component 12.5 build 19167825
VMware HorizonView PowerCLI Component PowerCLI Component 12.5 build 19033914
VMware VimAutomation Cloud PowerCLI Component PowerCLI Component 12.0 build 15940183

0 Kudos
LucD
Leadership
Leadership

That is exactly the same environment I tested in.

Is it only for that one user?
Or are there other users that experience the same?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Tags (1)
0 Kudos
pamiller21
Enthusiast
Enthusiast

Bingo, you found it.  I used my user (not my script user) and it worked.  My user is in an admin group, so I moved the script user into the admin group and it appears.

Thank you!

0 Kudos
NelsonCandela
Enthusiast
Enthusiast

Aaaaaaaaaargh this is so typical ... it's related to user permissions. 🙄

I was wondering for weeks now why there seems to be now way how to retrieve vCLS VMs until I checked this thread just minutes ago, used a different user from the one I usually use and *BOOOOM* suddenly I can retrieve those VMs in my scripts.

Thanks!

0 Kudos