Skip to content

Latest commit

 

History

History
76 lines (48 loc) · 1.53 KB

Get-PSLocation.md

File metadata and controls

76 lines (48 loc) · 1.53 KB
external help file Module Name online version schema
PSScriptTools-help.xml
PSScriptTools
2.0.0

Get-PSLocation

SYNOPSIS

Get common location values.

SYNTAX

Get-PSLocation [<CommonParameters>]

DESCRIPTION

This command will write an object to the pipeline that displays the values of common file locations. You might find this helpful when scripting cross-platform.

EXAMPLES

EXAMPLE 1

PS C:\> Get-PSLocation

Temp       : C:\Users\Jeff\AppData\Local\Temp\
Home       : C:\Users\Jeff\Documents
Desktop    : C:\Users\Jeff\Desktop
PowerShell : C:\Users\Jeff\Documents\WindowsPowerShell
PSHome     : C:\Windows\System32\WindowsPowerShell\v1.0

Results on a Windows system.

EXAMPLE 2

PS C:\> Get-PSLocation

Temp       : /tmp/
Home       : /home/jeff
Desktop    :
PowerShell : /home/jeff/.config/powershell
PSHome     : /opt/microsoft/powershell/7

Results on a Linux system running PowerShell.

PARAMETERS

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

PSLocation

NOTES

Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/

RELATED LINKS

Get-Location

Set-Location