Output PSEXEC Batch file result to text file
I created a very simple batch file to disable Hyper-V on multiple PCs on our network. My batch file is located on my c:\temp\DisableHyperV.bat and contains one line of text "
I created a text file at c:\temp\PC_List.txt which contains all computers (one on each line)
If I run the following: PsExec.exe @c:\temp\PC_List.txt -h -u domain_name\Admin_Account_Name -c c:\temp\DisableHyperV.bat it works great! it runs the batch file on each computers from the text file and displays success or failure for each on the command prompt screen. But I would like if possible to output that information in a text file and I fail to get this done. Tried multiple syntax to no avail.
I thought this would have worked: PsExec.exe @c:\temp\PC_List.txt -h -u domain_name\Admin_Account_Name -c "c:\temp\DisableHyperV.bat > c:\temp\results.txt"