Automation

 View Only
  • 1.  Get-Folder vCLS

    Posted Mar 09, 2022 04:00 PM

    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



  • 2.  RE: Get-Folder vCLS

    Posted Mar 09, 2022 04:19 PM

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



  • 3.  RE: Get-Folder vCLS

    Posted Mar 09, 2022 04:20 PM

    No it's missing there too



  • 4.  RE: Get-Folder vCLS

    Posted Mar 09, 2022 05:48 PM

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



  • 5.  RE: Get-Folder vCLS

    Posted Mar 09, 2022 05:52 PM

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



  • 6.  RE: Get-Folder vCLS

    Posted Mar 24, 2022 02:08 PM

    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



  • 7.  RE: Get-Folder vCLS
    Best Answer

    Posted Mar 24, 2022 02:27 PM

    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?



  • 8.  RE: Get-Folder vCLS

    Posted Mar 24, 2022 02:35 PM

    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!



  • 9.  RE: Get-Folder vCLS

    Posted Jun 20, 2022 12:53 PM

    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!