Get Desktop Dir
Last Modified: February 25, 2024 18:18 CEST

Get-DesktopDir #

SYNOPSIS #

Returns the path to the desktop

SYNTAX #

Get-DesktopDir [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION #

Returns the path to the desktop of the logged in user. The path does not contain a terminating backslash.

EXAMPLES #

Example 1:Returns the path to the desktop #

PS C:\> Get-DesktopDir
# Output

C:\Users\JohnDoe\Desktop

Returns the path to the desktop for the user John Dow.

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 #

System.Object #

NOTES #

Get-TempDir