Answered by:
Office 365 - set indidiual passowrd to never expire

Question
-
In office 365 online I want to set 3 user passwords to never expire.
Can this be done without using powershell?
If so how
Thanks Andy
Wednesday, August 29, 2018 4:43 PM
Answers
-
Hi,
I think you can't do this operation in the Office 365 admin center. PowerShell is the good choice for you to do it.
Follow the steps:
1. Run your powershell as administrator.
2. connect to MSOLService
Connect-MsolService
3. sign in your Office365 admin account
4. run the command to set it.
Set-MsolUser -UserPrincipalName <name of the account> -PasswordNeverExpires $true
You also need to install some required PowerShell module.
Refer the link below.
Best Regards,
Just do it.
- Marked as answer by Ruthless Roth Friday, December 7, 2018 8:56 PM
Wednesday, August 29, 2018 5:09 PM
All replies
-
Please post questions about O365 to the O365 community on the portal admin dashboard.
\_(ツ)_/
Wednesday, August 29, 2018 4:57 PM -
Hi,
Thanks for your question.
If you want to use Powershell to set user passwords to never expire.
You can use the command below.
Get-MsolUser | Set-MsolUser -PasswordNeverExpires $true
Please read the link to learn more about how to do it.
https://community.spiceworks.com/how_to/90269-office-365-password-management-with-powershell
Best Regards,
Just do it.
Wednesday, August 29, 2018 4:59 PM -
If it is a Cloud user you can only do this with PowerShell. Only Hybrid users (synced from Active Directory) can be modified with Active Directory Users & Computers and don’t require PowerShell.Wednesday, August 29, 2018 5:00 PM
-
Hi,
Thanks for your question.
If you want to use Powershell to set user passwords to never expire.
You can use the command below.
Get-MsolUser | Set-MsolUser -PasswordNeverExpires $true
Please read the link to learn more about how to do it.
https://community.spiceworks.com/how_to/90269-office-365-password-management-with-powershell
Best Regards,
Just do it.
Note that after Get-MsolUser to add the username, otherwise you have all of the mailboxes in your pipeline and set password PasswordNeverExpires on all mailboxes. For configuring PasswordneverExpires for an induvidual user, see below. For the three mailboxes you have to perform it separately.
Set-MsolUser -UserPrincipalName <User ID> -PasswordNeverExpires $true
Back in september 2014 I have written a blogpost (Dutch language) about this question: https://windowstechblog.nl/office-365-wachtwoord-nooit-vergeten-instellen
Cheers,
Martien van Dijk
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Check my Blog:https://windowstechblog.nl
Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
- Edited by Martien van Dijk Wednesday, August 29, 2018 5:11 PM
Wednesday, August 29, 2018 5:09 PM -
Hi,
I think you can't do this operation in the Office 365 admin center. PowerShell is the good choice for you to do it.
Follow the steps:
1. Run your powershell as administrator.
2. connect to MSOLService
Connect-MsolService
3. sign in your Office365 admin account
4. run the command to set it.
Set-MsolUser -UserPrincipalName <name of the account> -PasswordNeverExpires $true
You also need to install some required PowerShell module.
Refer the link below.
Best Regards,
Just do it.
- Marked as answer by Ruthless Roth Friday, December 7, 2018 8:56 PM
Wednesday, August 29, 2018 5:09 PM -
Thanks for your reminder.
Best Regards,
Lee
Just do it.
Wednesday, August 29, 2018 5:13 PM