Just stumbled upon this cool article about mounting your VI inventory as a drive via Powershell:
source – Hal Rottenberg aka halr9000:
- Establish a connection to your the server using the Get-VIServer command:
Get-VIServer -Server
for example,Get-VIServer -Server 192.168.10.10
When prompted, provide the administrator’s username and password to authenticate access on the server.- Get the root folder of the server:
$root = Get-Folder -NoRecursion
- Create a PowerShell drive named VI, based on the server root folder. You can use the built-in New-psDrive cmdlet.
New-PSDrive -Location $root -Name vi -PSProvider VimInventory -Root '\'
In this release, a single backslash is the required value for the -Root parameter.- Access the new drive by typing the following command:
cd vi:
To list the drive content, use Get-ChildItem or its alias Dir.- Navigate through your server inventory using the cd command with the full path to the host. For a fictional VI inventory it may looks like the following:
cd Folder01\DataCenter01\host\Web\LiveHost01