use new func in Tools.ps1 to get random file

This commit is contained in:
2023-10-05 14:23:06 -04:00
parent 0499a143ef
commit 9409f000e0
+1 -1
View File
@@ -1,5 +1,5 @@
# Run SFC to check the filesystem, convert the result from Unicode to UTF8, delete the intermediate $tempFile
$tempFile = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
$tempFile = Get-RandomTempFile
$(sfc.exe /scannow) | Out-File $tempFile
Set-Content -Path $tempFile -Value $(Get-Content -Path $tempFile -Encoding Unicode) -Encoding UTF8
$SFCOutput = Get-Content -Path $tempFile