• Download our FREE True Price of Office 365 Whitepaper
  • Give us a call: 877-788-1617

    Stay in the know with the MessageOps newsletter:

    Encrypting Microsoft Online Admin Credentials in Scripts

    One of the most common PowerShell questions we get asked is how to encrypt the Microsoft Online Admin credentials in scripts.  What people want to do is create scripts for others to run, such as their helpdesk, without letting them know the Admin password.

    This request isn’t specific to Microsoft Online, and the folks over at www.powershell.com, have several scripts which deal with this issue.  The script that we’ve basically repackage can be found at:

    http://powershell.com/cs/blogs/tobias/archive/2010/10/22/encrypting-passwords.aspx

    There is lots of great information in that post, but it should be noted the password really isn’t encrypted, it’s obfuscated.  So it is possible to figure out the password from the encoded information, this makes it difficult for the average admin.

    What we’ve done is create a little GUI for the script shown below:

    MessageOps Microsoft Online Password Obfuscator

    When you run the script, just enter the Admin UserName and Password and Click the Generate Credential Information.  You then copy all the information generated to your script.  The $adminCredential variable will contain the Credentials that you can then use throughout the script.  As you can see, most people probably won’t be able to determine the Password by looking at the information or know how to go about decoding it.

    The script is available for download on the MessageOps Scripts Page .  It’s called Password Obfuscator.

    As always let us know if you have any questions or comments, by emailing info@messageops.com.

    Ready to get started? Contact us today to learn more.

    CONTACT US