Reputation: 59
I would like to add a line to my script that open a new power shell console and run a ping command in the new window.
Upvotes: 5
Views: 9443
Reputation: 182
start-process powershell.exe -argument '-nologo -noprofile -executionpolicy bypass -command Test-Connection ipAddressToPing; read-host "press enter"'
You can add the ip address to the script or leave it out and it will ask you for it at runtime. You can remove the read-host "press enter"' if you want the window to close right away.
Upvotes: 7