use new func in Tools.ps1 to get random file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user