| external help file | PSScriptTools-help.xml |
|---|---|
| Module Name | PSScriptTools |
| online version | https://jdhitsolutions.com/yourls/1e55c2 |
| schema | 2.0.0 |
Get common location values.
Get-PSLocation [<CommonParameters>]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.
PS C:\> Get-PSLocation
Home : C:\Users\Jeff
Documents : C:\Users\Jeff\Documents
Temp : C:\Users\Jeff\AppData\Local\Temp\
Desktop : C:\Users\Jeff\Desktop
PowerShell : C:\Users\Jeff\Documents\PowerShell
PSHome : C:\Program Files\PowerShell\7
ModulePaths : {C:\Users\Jeff\Documents\PowerShell\Modules, C:\Program Files\PowerShell\Modules,...}Results on a Windows system running PowerShell 7
PS /home> Get-PSLocation
Home : /home/jeff
Documents :
Temp : /tmp/
Desktop :
PowerShell : /home/jeff/.config/powershell
PSHome : /opt/microsoft/powershell/7
ModulePaths : {/home/jeff/.local/share/powershell/Modules, /usr/local/share/powershell/...}Results on a Linux system running PowerShell.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: https://jdhitsolutions.com/yourls/newsletter