The Inventory Provider
The Inventory Provider (VimInventory ) is designed to expose a raw inventory view of the inventory items from a server. It enables interactive navigation and file-style management of the VMware vSphere inventory.
By creating a PowerShell drive based on a managed object (such as a datacenter), you obtain a view of its contents and the relationships between the items. In addition, you are able to manipulate objects (move, rename or delete them) by running commands from the vSphere PowerCLI console.
When you connect to a server with Connect-VIServer, the cmdlet builds two default inventory drives: vi and vis
- The vi inventory drive shows the inventory on the last connected server.
- The vis drive contains the inventory all vSphere servers connected with in the current vSphere PowerCLI session.
You can use the default inventory drives or create custom drives based on the default ones
To view the content of a default inventory drive
- Access the vi inventory drive by typing cd vi:
- Type dir
The Datastore Provider
The Datastore Provider (VimDatastore) is designed to provide access to the contents of one or more datastores. The items in a datastore are files that co ntain configuration, virtua l disk, and the other data associated with a virtua l machine.All file operations are case-sensitive.
When you connect to a server with Connect-VIServer , the cmdlet builds two default datastore drives:
- vmstore: The vmstore drive displays the datastores available on the last connected vSphere server.
- vmstores: The vmstores drive contains all datastores available on all vSphere servers connected within the current vSphere PowerCLI session. You can use the default inventory drives or create custom drives based on the default ones
To browse a default datastore drive
- Access the vmstore drive – set-location vmstores: or type cd vmstore:
- List the drive content:dir
- Follow the commands down