Powershell : Avoid exe running in another window
I have a script which will call tsm.exe and perform backup of the Directory for that Period .
I am using Invoke-command or Start-process it executes quite ok but tsm.exe is open in a new window , I don't want it to run in another window , I need to capture the output and want to redirect it in log
Invoke-Command -Filepath d:\Backup\tsm.exe -ArgumentList $Period, $Directory
Please check out below article and see if that works for you.
You must be logged in to reply to this topic.