Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Ctrl+C and a prompt

$
0
0

I have a PS script that runs to gather info on remote servers, I'd like to be able to press

Ctrl+c   and have a prompt  "would you like to terminate (Y/N)?"  and of course if you press "Y" then it terminates back to the prompt and "N" continues the task. 


Can someone point me in the direction on how to accomplish this?


Thanks
Shane


Viewing all articles
Browse latest Browse all 6937

Trending Articles