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
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
When you just do Get-Folder, does it include a folder named 'vCLS'?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No it's missing there too
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
And is the account you are using a member of the Administrators group?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
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
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
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!
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!