New-Datacenter Command | Vmware PowerCLI Reference


This cmdlet creates a new datacenter in the location that is specified by the Location parameter.


[ -Location ] < VIContainer >
-Name < String >
[-Server < VIServer[] > ]


Required Parameter Name Type Position Features Description
Location VIContainer 1
  • pipeline
  • wildcards
Specifies the location where you want to create the new datacenter.
Name String named
Specifies a name for the new datacenter.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.




Example 1

$folder = Get-Folder -NoRecursion | New-Folder -Name Folder

New-Datacenter -Location $folder -Name Datacenter | fl

Gets the inventory root folder and create a new folder called Folder in it. Creates a new datacenter called Datacenter in the Folder folder. The result is pipelined to the fl command to retrieve a flat view of the new datacenter properties.

Related Commands


This cmdlet retrieves the datacenters available on a vCenter Server system.

This cmdlet moves a vCenter Server datacenter from one location to another.

This cmdlet creates a new datacenter.

This cmdlet removes the specified datacenters from their locations.

This cmdlet modifies the properties of the specified datacenter.