HOWTO Set an individual user’s password to never expire in Office365

Most organization have a policy to expire password after 90 days, commonly use in information security risk management to setup an accounts. But we also need to create an account with no password expiration because of it’s function in the server or created for specific service.

The step-by-step procedure will guide you on how you can accomplish this task.

Given the following information:

  • I’m using Office365 for email, sharepoint, etc.
  • Windows 10 Pro 64bit

Let’s start.

Step 01. In Windows 10 Professional, the Power Shell program  is available. In your search bar, type Windows PowerShell or simply PowerShell. When you see it right-click on Windows PowerShell and select Run as Administrator.

Que.com.PowerShell.by.office.com.01.png

The PowerShell window ill pop open.

Que.com.PowerShell.by.EM.at.Que.com.02

Step 02. Run Install-Module MSOnline command.

Que.com.PowerShell.by.EM.at.Que.com.03.PNG

Step 03. Connect to your Office 365 subscription. To connect with your Office 365 administrator account. If will prompt you to enter your admin email address and password. In my case, I have to enter also my pin code because MFA is enabled.

$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential

Step 04. Now let’s set a user to never expire.

Run this command.

Set-MsolUser -UserPrincipalName <name of the account> -PasswordNeverExpires $true

For example, to see the status for support@que.com, you’d type the following:

Set-MsolUser -UserPrincipalName support@que.com -PasswordNeverExpires $true

Que.com.PowerShell.by.office.com.04.PNG

Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires

For example, to see the status for support@que.com, you’d type the following:

Get-MSOLUser -UserPrincipalName support@que.com | Select PasswordNeverExpires

That’s it.

If you have a follow questions, please use our Forum or the form below to post your comment.

 

Images from Office.com website.

References:

  1. Connect to Office 365 PowerShell – https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell
  2. Set an individual user’s password to never expire – https://support.office.com/en-us/article/set-an-individual-user-s-password-to-never-expire-f493e3af-e1d8-4668-9211-230c245a0466?ui=en-US&rs=en-US&ad=US

Support @QUE.COM

Founder, QUE.COM Internet Media. | Founder, Yehey.com a Shout for Joy! | MAJ.COM Management of Assets and Joint Ventures. More at KING.NET Ideas to Life.

Leave a Reply