My Technical Notes

Monday, 15 August 2016

Executing a PowerShell Script via a BAT file and Capturing Output


powershell.exe -command "& C:\path\to\MyScript.ps1" >> C:\path\to\log.txt 2>&1

No comments: