Tip: You can use a temporary file (ex: script, function, …) and then just clean up (delete) at the end once you don’t need that.
Instead of hardcoding a path for a temporary file, you can use the GetTempFileName method.
In PowerShell v5, there is a new cmdlet : New-TemporaryFile
# PowerShell v4 (and earlier)
$tempFile = [System.IO.Path]::GetTempFileName()
# PowerShell v5
$tempFile = New-TemporaryFile
Remove-Item -Path $tempFile