Paths: IV

The last of our path cmdlets is Convert-Path.  This converts a PowerShell path to a PowerShell provider path.

This sequence should explain how it works.

 

PS> cd HKLM:
PS> cd software
PS> cd microsoft
PS> Get-Location

Path
----
HKLM:\software\microsoft

PS> Convert-Path -Path (Get-Location)
HKEY_LOCAL_MACHINE\software\microsoft

 

change drive to the HKLM: registry drive

navigate into the software\microsoft key

Get-Location returns the provider path i.e. file system style

Convert-path returns the path in the registry.

Technorati Tags: ,,
Published Mon, Mar 15 2010 20:46 by RichardSiddaway
Filed under:

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: