How can I make my script stop when clicked on the cancel Button?

Welcome Forums General PowerShell Q&A How can I make my script stop when clicked on the cancel Button?

Viewing 0 reply threads
  • Author
    Posts
    • #268679
      Participant
      Topics: 3
      Replies: 4
      Points: 37
      Rank: Member

      Dear Community
      I am working on a script that gives you prompts for copying whole folderstructures including the ACLs (permissions)
      My Question now is how can I make it so that when I click on the cancel button in the popup that it actually cancels?

      Here is my code:

      This was posted in StackOverflow too: https://stackoverflow.com/questions/64659341/how-can-i-make-my-script-stop-when-clicked-on-the-cancel-button

      Thanks in advance

      Martin

      • This topic was modified 4 weeks ago by grokkit.
      • This topic was modified 4 weeks ago by kvprasoon. Reason: code formatting
      • This topic was modified 4 weeks ago by kvprasoon. Reason: code formatting
      • This topic was modified 4 weeks ago by kvprasoon.
Viewing 0 reply threads
  • You must be logged in to reply to this topic.