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
- 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
- View the content of the host using the ls command.
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.
- View only the virtual machines on the host.
When called within the inventory drive,
Get-VM gets a list only of the virtual machines on the current drive location.
- Delete a virtual machine named VM1.
- Rename a virtual machine, for example, from VM1New to VM1.
- Start all virtual machines with names that start with VM.