I was bulk-creating users for a test environment today, and in doing so, I borrowed a script from an article online, which set the password for all users to ‘Pa$$word’ I usually use a variation on the same for test environments, but I opted to leave this one as it was. The script worked.
A few minutes later, I went to log on as one of the newly created users, and the computer returned ‘The password is incorrect. Try again.’
I spent a few minutes troubleshooting, until I realized… PowerShell uses the dollar sign ($) for variables. I deleted the users, then changed the script to use a password like ‘P@ssw0rd’. Sure enough, it worked.
The moral of the story… When using PowerShell, remember that the $ means something, and might break things if you use it for other things.
Have fun!
Leave a Reply