• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

VI Powershell: Creating a PSDrive to browse your inventory

Duncan Epping · Mar 26, 2008 ·

Just stumbled upon this cool article about mounting your VI inventory as a drive via Powershell:

source – Hal Rottenberg aka halr9000:

  1. 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.

  2. Get the root folder of the server:
    $root = Get-Folder -NoRecursion
    
  3. 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.

  4. Access the new drive by typing the following command:
    cd vi:
    


    To list the drive content, use Get-ChildItem or its alias Dir.

  5. 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
    

Related

Management & Automation, Server ESX, Scripting, VirtualCenter, VMware

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Also visit!

For the Dutch-speaking audience, make sure to visit RunNerd.nl to follow my running adventure, read shoe/gear/race reviews, and more!

Do you like Hardcore-Punk music? Follow my Spotify Playlist!

Do you like 80s music? I got you covered!

Copyright Yellow-Bricks.com © 2026 · Log in