February 2019
Intermediate to advanced
626 pages
15h 51m
English
Set-Location, which has the alias cd, is used to navigate around a provider's hierarchy, for example:
Set-Location \ # The root of the current drive Set-Location Windows # A child container named Windows Set-Location .. # Navigate up one level Set-Location ..\.. # Navigate up two levels Set-Location Cert: # Change to a different drive Set-Location HKLM:\Software # Change to a specific child container under a drive
Set-Location may only be used to switch to a container object.
The print working directory pwd variable shows the current location across all providers:
PS> $pwdPath ---- HKLM:\Software\Microsoft\Windows\CurrentVersion
Read now
Unlock full access