Getting Real Paths

by May 22, 2009

PowerShell uses virtual drives, which sometimes have a close mapping to the "real" drives you see in Windows Explorer. However, sometimes these drives have no apparent real-world relation. Let's say you have created the following drive "test":

New-PSDrive test FileSystem $env:windir
dir test:

The virtual drive "test" now points to your Windows folder. To "translate" virtual paths to real paths, use Convert-Path:

Convert-Path test:system32