Set No expire password for Office365 users


Set password Expire policy for Office 365 Users

  1. Install following components on your management PC:
    Download and install Microsoft Online Services Sign-In Assistant32-Bit version:
    Microsoft Online Services Sign-In Assistant (IDCRL7)
    http://go.microsoft.com/fwlink/p/?linkid=23629964-Bit version:
    Microsoft Online Services Sign-In Assistant (IDCRL7) – 64 bit version
    http://go.microsoft.com/fwlink/p/?linkid=236300

    Windows Azure Active Directory Module for Windows PowerShell

    32-Bit version:

    Windows Azure Active Directory Module for Windows PowerShell
    http://go.microsoft.com/fwlink/p/?linkid=236298

    64-Bit version:

    Windows Azure Active Directory Module for Windows PowerShell (64-bit version)

  1. Click the Windows Azure Active Directory Module for Windows PowerShellRun Powershell and type import-module MSOnline at the Windows PowerShell command prompt.
  2. At Powershell command prompt, type Connect-MsolService
  3. Enter Principal account to logon to Microsoft online service.

  4. Once connected, do Either one of this:

To check PasswordNeverExpires status:

Type:             Get-MSolUser –UserPrincipalName <USERID> | Select PasswordNeverExpires

Example:     Get-MSolUser –UserPrincipalName xyz@abc.com | Select PasswordNeverExpires

*For all the users, use parameter –All instead of –UserPrincipalName

Get-MSolUser –All | Select PasswordNeverExpires

To check for the “Password never expires” setting for all users with UserPrincipalName
Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

  1. To enable PasswordNeverExpires:

Type:             Get-MSolUser –UserPrincipalName <USERID> | Set-MsolUser –PasswordNeverExpires $true

Example:     Get-MSolUser –UserPrincipalName xyz@abc.com | Set-MsolUser –PasswordNeverExpires $true

To set all users to enable PasswordNeverExpires:

Get-MSolUser –All | Set-MsolUser –PasswordNeverExpires $true

**Please note: do expect some or long delay to list all users based on number of users you have.

More details:

http://technet.microsoft.com/library/jj151815.aspx

Advertisements

About Robiul

Robiul has 15 years of continuous successful career experience in ICT with extensive background in System Engineering, IT infrastructure design, operations and service delivery, managing IT projects / MIS functions for local and multi-national companies with in-depth knowledge of multiple operating systems as well as construct / manage small to medium size Data Center. Proven ability to design and implement medium to semi-large scale LAN/WAN/WLAN and system infrastructures. Academic qualification: Master of Science in Information Systems. Professional certifications are: MCSE, CCNA, ITIL and FoundStone Security Professional, VCP, NetAPP, CISSP etc.
This entry was posted in Powershell and tagged . Bookmark the permalink.