I need to execute 3 commands from a PowerShell script.
The commands look like:
change user /install c:\mydir\mysetup.exe change user /execute
I created a .cmd file (let’s say, mycmd.cmd) and I try to launch it from my .ps1 script but I am unable to find the right syntax. Based on what I see the following syntax should work:
& cmd.exe /c c:\mydir\mycmd.cmd
but it doesn’t…
Can anybody please help?
Can I send each single line from my .ps1 file and run it in a synchronous way?