Sunday, 8 July 2012

#Microsoft Office 365 - Reset All Users Passwords in PowerShell - Additional for password never expired


     1.  Install Microsoft Online Services Module for Windows PowerShell
     2.  Run Microsoft Online Services Module for Windows PowerShell as Administrator
     3.  Type Import-Module MSOnline
     
     4.  Type Connect-MsolService -cred $cred
    
     5.  Insert Office365 admin user name and password

      6.  Type Get-Command -Module msonline

     7.  Type Get-msoluser |set-msoluserpassword -newpassword “password” -forcechangepassword $false
     8.  Password will start reset for all users                              


additional: Password never expired 
For all users: Type Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
For individual user: Type Get-MSOLUser -example@domain.com -PasswordNeverExpires $true -StrongPasswordRequired $true


No comments:

Post a Comment