For example; with the old command prompt it would be:
cmd.exe /k mybatchfile.bat
Thanks.
John.
For example; with the old command prompt it would be:
cmd.exe /k mybatchfile.bat
Thanks.
John.
Drop into DOS (or indeed PowerShell itself) and type this:
powershell -?
You'll see that powershell.exe has a "-noexit" parameter which tells it not to exit after executing a "startup command".
Thanks, Matt, that's just the job. It also needs you to specify the directory of the batch file so the exact conversion is:
powershell.exe -noexit .\mybatchfile.bat
John.
how do I execute a batch file on remote machines using powershell. I want to update the windows GAC (assembly) folder with some assemblies on multiple machines. I can update the GAC using a batch file but I want to run this batch file on all the machines.
Thanks,