Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Get-Location

Get-Location - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Get-Location

Short description
Gets information about the current working location or a location stack.

Syntax


Description
The Get-Location cmdlet gets an object that represents the current directory, much like the pwd (print working director
y) command.


When you move between Windows PowerShell drives, Windows PowerShell retains your location in each drive. You can use Ge
t-Location to find your location in each drive.


You can use Get-Location to get the current directory at run time and use it in functions and scripts, such as in a fun
ction that displays the current directory in the Windows PowerShell prompt.


You can also use the Get-Location cmdlet to display the locations in a location stack. For more information, see the No
tes and the descriptions of the Stack and StackName parameters.