Contact Info

Crumbtrail

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

Get-Location - Powershell 4.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 
directory) command.


When you move between Windows PowerShell drives, Windows PowerShell retains your location in each drive. You can use 
Get-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 
function 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 
Notes and the descriptions of the Stack and StackName parameters.