hi,
some how it looks difficult to get a list of vm´s which are in the default hidden folder 'vm'
I want to have a list of vm´s which are not in any folder,
Get-VM -Location (Get-Folder -Name 'vm'-Location (Get-Datacenter -Name 'dc1') | where-object {$_.Name -eq 'vm'})
this command for example will always list vm´s which are included in subfolders.
How can I do that?
Thanks
Use the NoRecursion switch
Get-Datacenter -Name dc1 | Get-Folder -Name vm | Get-VM -NoRecursion
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Use the NoRecursion switch
Get-Datacenter -Name dc1 | Get-Folder -Name vm | Get-VM -NoRecursion
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference