Thursday, July 26, 2012

Office365 - Set All User Account Passwords to NOT Expire

Go here: http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh124998.aspx 

Download and install these two things according to the OS architecture of the machine you’re currently using to perform this operation:
Microsoft Online Services Sign-In Assistant (IDCRL7) - (32 bit version)
Microsoft Online Services Sign-In Assistant (IDCRL7) - (64 bit version)

AND

Microsoft Online Services Module for Windows PowerShell - (32-bit version)
Microsoft Online Services Module for Windows PowerShell - (64-bit version)

NOTE: Norton 360 classified the Microsoft Online Services Module download as a threat for me, and removed it from my downloads. Be prepared to disable your A/V.

Once these are installed, Click the start button, in the search field type Microsoft Powershell, open the result "Microsoft Online Services Module for Windows PowerShell”

Enter the following command:

Connect-MsolService

You will be prompted for credentials. Use the account administrator credentials.

Type the following, and hit enter.

Set-ExecutionPolicy Unrestricted

press Y for yes, and hit enter

Copy and paste the entire next command

$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
Import-PSSession $Session

You will be Prompted for credentials again. Enter them, and hit ok. You'll then see warninds about "You connection has been redirected to the folling URI". This is ok. NOTE: The last line of that command is still waiting to be run. You need to hit enter for it to execute. Once it's done, use the following command to set all user account passwords to never expire:

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

No comments:

Post a Comment