Can anyone tell me how to create a network folder. The New-Folder cmdlet doesn't provide that as an option ,but yet under the vSphere 5.1 Webclient that's an option.
I'm trying to automate the creation of folders, dvSwitches and dvPortGroups. I can do the rest but can't seem to figure out how to create the network folder which is really the first thing that I want to do.
Any help would be greatly appreciated.
Cheers
Ant
Hello, IMMIAnt-
You can use the -Location parameter to New-Folder. To create a network folder in a given datacenter, do something like:
## new network folder in the given datacenter
New-Folder testInNetwk -Location (Get-Datacenter myDC0 | Get-Folder network -NoRecursion)
And, to create a folder right in the root (not in a datacenter), you can do:
## folder at the root of the vC
New-Folder testFolder -Location (Get-Folder -NoRecursion)
That get at what you are after?
Hello, IMMIAnt-
You can use the -Location parameter to New-Folder. To create a network folder in a given datacenter, do something like:
## new network folder in the given datacenter
New-Folder testInNetwk -Location (Get-Datacenter myDC0 | Get-Folder network -NoRecursion)
And, to create a folder right in the root (not in a datacenter), you can do:
## folder at the root of the vC
New-Folder testFolder -Location (Get-Folder -NoRecursion)
That get at what you are after?
Hi mattboren
That was exactly what I was after. Thanks for the help, I really appreciate it.
Cheers
Ant