5 Replies Latest reply on Sep 10, 2012 6:53 AM by crawfordm

    Special Character in the input

    crawfordm Expert
    vExpert

      I am trying to use a script to change all the root passwords on our ESXi servers, but our root password has a ! in it and this causes the script to fail.

       

      This is the line in the script where the user inputs the pasword :

       

      $rootpswd = Read-Host -Prompt "Old root password"

       

      How do I change the script so that it will accept the ! in the password?

       

      Thanks


      Marc Crawford