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

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

Prerequisites

Verify that you are connected to a vCenter Server system.

Procedure

  1. Get the root folder of the server.
    $root = Get-Folder -NoRecursion
  2. Create a PowerShell drive named myVi in the server root folder.
    New-PSDrive -Location $root -Name myVi -PSProvider VimInventory -Root '\'
    Note: 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.