Skip to content

Get TemporaryFolder

dscbot edited this page Feb 13, 2024 · 2 revisions

Get-TemporaryFolder

SYNOPSIS

Returns the path of the current user's temporary folder.

SYNTAX

Get-TemporaryFolder [<CommonParameters>]

DESCRIPTION

Returns the path of the current user's temporary folder.

EXAMPLES

EXAMPLE 1

Get-TemporaryFolder

Returns the current user temporary folder on the current operating system.

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

OUTPUTS

System.String

NOTES

This is the same as doing the following

  • Windows: $env:TEMP
  • macOS: $env:TMPDIR
  • Linux: /tmp/

Examples of what the command returns:

  • Windows: C:\Users\username\AppData\Local\Temp\
  • macOS: /var/folders/6x/thq2xce46bc84lr66fih2p5h0000gn/T/
  • Linux: /tmp/

RELATED LINKS

Clone this wiki locally