Reputation: 43
When running: New-Folder -Name myFolder -Location (Get-Folder -NoRecursion)
it creates a root folder under "Hosts and clusters"... How do I create a root folder under the Datastores Tab?
Thank you!
Upvotes: 0
Views: 1250
Reputation: 2121
To do this, you'll need to reference the hidden (from UI) 'datastore' folder object. You can do this with the following code:
New-Folder -Name myFolder -Location (Get-Folder -Name datastore)
Similarly, you can do the same thing when you need to create Host or Network folders.
Upvotes: 1