RosettaCodeData/Task/Secure-temporary-file/PowerShell/secure-temporary-file.ps1

5 lines
162 B
PowerShell
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
$tempFile = [System.IO.Path]::GetTempFileName()
Set-Content -Path $tempFile -Value "FileName = $tempFile"
Get-Content -Path $tempFile
Remove-Item -Path $tempFile