Datacenter Category
Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations
Step 1: Retrieve a object by running a Get command
# Retrieves a list of all datacenters on the server, whose names begin with "Datacenter".
Get-Datacenter -Name Datacenter*
Step 2 : Run commands from the CRUD group
# 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.
$folder = Get-Folder -NoRecursion | New-Folder -Name Folder New-Datacenter -Location $folder -Name Datacenter | fl
# Moves the Datacenter datacenter into the folder named Folder.
Move-Datacenter Datacenter -Destination Folder
# Removes the Datacenter datacenter.
Remove-Datacenter Datacenter
Step 3: Explore More Related Commands:
Set-Datacenter | This cmdlet modifies the properties of the specified datacenter. |