In addition to the default drive, you can create new custom inventory drives by using the New-PSDrive cmdlet.


An alternative to creating a inventory drive is to map an existing inventory path. For example, run:New-PSDrive -Name myVi -PSProvider VimInventory -Root “vi:\Folder01\Datacenter01”

Connect to a vSphere server.


Get the root folder of the server.

$root = Get-Folder -NoRecursion

Create a PowerShell drive named myVi in the server root folder.

New-PSDrive -Location $root -Name myVi -PSProvider VimInventory -Root '\'

You can use the New-InventoryDrive cmdlet, which is an alias of New-PSDrive. This cmdlet creates a new inventory drive using the Name and Datastore parameters. For example:Get-Folder -NoRecursion | New-VIInventoryDrive -Name myVi.