you're reading...
Office 365, PowerShell, Tips & Advice

Office 365 PowerShell Tip: Disable Password Expirations on Users

Not all features are available through the Office 365 Portal.  There are a lot of features that you can enable with with PowerShell.  PowerShell may sound a little scary, which is why we’ve been posting PowerShell commands you can cut and paste with our Office 365 PowerShell tip series.

Previously in BPOS and similarly with Office 365, there are user password expirations.  This expiration policy may differ than your normal corporate environment (if you don’t use single sign-on) or may just be an annoyance for your non-techie users.  With Office 365, you have the ability to disable the password expiration.  This needs to be done on a per user basis.  The code we are about to give you will:

  1. Disable all password expiration policies for all users
  2. Will not apply to new users created after this code is executed
  3. Must be run each time you add a new user

Here’s a quick two line PowerShell command you can do to disable password expiration for your users:

  1. Install the Office 365 PowerShell modules
  2. Launch the command shell from the start menu (Start → All Programs → Microsoft Online Services → Microsoft Online Services Module for Windows PowerShell)
  3. Copy and paste the following into the window:

Connect-MsolService

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

Make sure you do this each time you add a new user to your environment.

You don’t need to know PowerShell, you just need to know how to cut and paste :)

Advertisement

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s