Tuesday, October 1, 2013

How to configure passwords to never expire in O365

Install the Windows Azure AD Module

You must install the appropriate version of the Windows Azure AD Module for Windows PowerShell for your operating system from the Microsoft Download Center:
Windows Azure Active Directory Module for Windows PowerShell (32-bit version)
Windows Azure Active Directory Module for Windows PowerShell (64-bit version)

Start the Windows Azure Active Directory Module for Windows PowerShell


Connect to Windows Azure Active Directory

Type connect-msolservice …and log in with your admin account
Review: the TechNet Article for a list of available commands
http://technet.microsoft.com/library/jj151815.aspx

Run the following command to GET a specific user's Password Expiration Policy:
Get-MSOLUser -UserPrincipalName user@company.com | Select PasswordNeverExpires

Run the following command to GET ALL User's Password Expiration Policy:

Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires
Run the following command to SET a User's Password Expiration Policy:

Set-MsolUser -UserPrincipalName [user@company.com -PasswordNeverExpires $true



TIP: if you love Get-Help then you will need to add it: 

To create a folder for help, list the cmdlets, and then open the file in notepad, you can run the following commands at the Windows PowerShell command prompt:
new-item c:\MSOLHelp -type directory
get-command | Where-Object {$_.name -like "*msol*"} | format-list | Out-File c:\MSOLHelp\msolcmdlets.txt
notepad c:\MSOLHelp\msolcmdlets.txt

No comments:

Post a Comment