Monday, June 17, 2013

set-msoluserpassword does not accept Secure.String

I recently migrated to Office 365 from Live at EDU. I was pleased to see that the strong password requirements can be disabled. I set out to upgrade my user creation script for the new Powershell cmd-lets. Live @ edu used Exchange cmd-lets which require submitting the password as Secure.String. I figured the MSOL cmd-lets would also require it. when i first ran the updated script i would get this.

"Set-MsolUserPassword : You must choose a strong password that contains 9 to 16 characters, a combination of letters, and at least one number or symbol. Choose  another password and try again."

Even though I had set the new-msoluser to -strongpasswordrequired $false

After a little time spent, I found out converting my to-be passwords as secure.string was the problem. I updated the script to use plain text and it worked fine. The passwords still require at least 8 characters, but they do not require a combination of capitals and numbers