You can use the PowerCLI Inventory Provider to browse, modify, and remove inventory objects from inventory drives.
Prerequisites
Verify that you are connected
to a
vCenter
Server
system.
Procedure
1 | Navigate to a host in your server inventory by running the cd command with the full path to the host. cd Folder01\DataCenter01\host\Web\Host01
|
2 | View the content of the host using the ls command. ls
ls is the UNIX style alias of the Get-ChildItem cmdlet.
This command returns the virtual machines and the root resource pool of the host.
|
3 | View only the virtual machines on the host. Get-VM
When called within the inventory drive, Get-VM gets a list only of the virtual machines on the current drive location.
|
4 | Delete a virtual machine named VM1. del VM1
|
5 | Rename a virtual machine, for example, from VM1New to VM1. ren VM1New VM1
|
6 | Start all virtual machines with names that start with VM. dir VM* | Start-VM
|