Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell Ctrl+c

$
0
0

Hello,

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 selecting "N" continues the task. 


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


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>