Office365 PowerShell Nugget: Setting Password to Never Expire

0 Flares Twitter 0 Facebook 0 StumbleUpon 0 Google+ 0 LinkedIn 0 0 Flares ×

Another really useful office365 PowerShell nugget for setting password never to expire, from http://blogs.technet.com/b/educloud/archive/2012/06/25/turn-off-password-expiry-in-office-365-for-education.aspx.

First off start with the normal connection routine:

1. > $LiveCred = Get-Credential
2. Now you need to enter your office365 credentials in the popup
3. > $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
3. > Import-PSSession $Session (note that if this command fails, you may have to use “Set-ExecutionPolicy RemoteSigned” first, but please make sure you understand the implications of this first).
4. > Connect-MsolService

Then the final step to reset the actual password:

5. Set-MsolUser –UserPrincipalName YourUPN -PasswordNeverExpires $True

Where YourUPN is your user principal name, e.g. name@domain.com

Matt

,

The Essential App Marketing Kit
Subscribe To My Newsletter To Get an Entire Chapter From The Book for FREE
Never display this again
0 Flares Twitter 0 Facebook 0 StumbleUpon 0 Google+ 0 LinkedIn 0 0 Flares ×