checking confirm action removing computers from AD

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 8 months ago.

  • Author
    Posts
  • #6282

    by morochi at 2013-02-19 14:46:06

    I have a script that deletes computers from AD using remove-adcomputer, and create a log with the name of the machine and time when the machine was deleted. The problem I have is that I want to add an entry to the
    log only when the user click yes in the confirm message box when running the script in the Powershell ISE or enter Y in the confirm message in the shell. If the user change his mind and click no, then I dont want to enter an entry
    in the blog. My question is how you check if the user click on confirm and use and if else statement for this.

    by AlexBrassington at 2013-02-19 23:23:32

    It sounds like you want something like this: http://technet.microsoft.com/en-us/maga ... 77563.aspx

You must be logged in to reply to this topic.