If you’re gonna use powershell, use Start-Transcript -Force c:\yourpath.txt and Stop-Transcript. I use that quite a bit for action troubleshooting. An example:
// Disable wow64 redirection on x64 OSes
action uses wow64 redirection {not x64 of operating system}
delete __createfile
// CREATEFILE
createfile until END_OF_FILE
Start-Transcript -Force c:\temp\uninstall.txt
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match “Microsoft Office”
}
$app.Uninstall()
Stop-Transcript
END_OF_FILE
delete powershell.ps1
move __createfile powershell.ps1
waithidden { pathname of file ((it as string) of value “Path” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell” of native registry) } -ExecutionPolicy Bypass -File powershell.ps1
That’s just a generic powershell template I got from another user on this forum; you can wrap w/e in it.