CmdID

CmdID / PowerShell / Cmdlets / New

New-TemporaryFile

Creates a temporary file. PowerShell reference

From the PowerShell reference 2 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Creates a temporary file. This cmdlet creates temporary files that you can use in scripts. The New-TemporaryFile cmdlet creates an empty file that has the .tmp file name extension. This cmdlet names the file tmp<NNNN>.tmp, where <NNNN> is a random hexadecimal number. The cmdlet creates the file in your TEMP folder. This cmdlet uses the Path.GetTempPath() method to find your TEMP folder. This method checks for the existence of environment variables in the following order and uses the first path found: - On Windows platforms: 1. The path specified by the TMP environment variable. 1. The path specified by the TEMP environment variable. 1. The path specified by the USERPROFILE environment variable. 1. The Windows directory. - On non-Windows platforms: Uses the path specified by the TMPDIR environment variable.

New-TemporaryFile [-WhatIf] [-Confirm] [<CommonParameters>]

Create a temporary file

$TempFile = New-TemporaryFileIdentify

Its page in the reference: New-TemporaryFile.

Parameters

2 in the PowerShell reference
-ConfirmPrompts you for confirmation before running the cmdlet.
-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.