Create a Generic password for all the office365 users


If we go with a migration of 50 + or 100 + users, it would be difficult to distribute the password which were generated by office 365 directly during migration is a big head ace for the It departments.

So let us see a solution where we can set a unique password for all the office365 users and you can only achieve this using power shell

Before this you need to know how to connect to Office365 using PowerShell, my previous post speaks about this and below is the link for you.

http://prakash-nimmala.blogspot.in/2014/09/how-to-connect-to-office-365-using.html

Once you followed the steps mentioned in the above article, to connect to the Office365 using Powershell follow below instructions to set a generic\ Unique password for all the MSOnline users\O365 users.


  1. Once you connected your power shell to office 365, type the below command to see the list of MSonline users.
    Get-MSOLUser -All 
  2. Now type the below command to set the desired password for all the users
    Get-MsolUser -All | Set-MsolUserPassword -NewPassword E@syP@ss -ForceChangePassword $True >c:\Password.csv
The above command set the password as "E@syP@ss" for all the user account in your office365, and the attribute ForceChangePassword should be True, if you want to restrict users to change their password at next logon.

See how easy it is and provide your comment. 

0 comments:

Post a Comment