No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

How to set user passwords never expired in office 365 (P1)?

This question is answered This question is answered

I tried to follow topic http://community.office365.com/en-us/forums/150/p/18015/83875.aspx#83875 to make our company's user passwords in 365 to never expire. I got a following error message in Windows PowerShell (screenshot below) "The term 'Connect-MSOLService' is not recognized as the name of o cmdlet, function, script file or operable program." Etc...

 

  

Verified Answer
  • Hello Sami,

    From your screenshot, I see it is not Microsoft Online Services Module for Windows PowerShell. For it does not include Windows built-in PowerShell, I suggest you use Microsoft Online Services Module for Windows PowerShell to set user passwords to never expire.
    For how to install the Office 365 cmdlets:
    http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh124998.aspx#BKMK_install

    Besides, you can follow these steps after you install it.
    1.Open the Microsoft Online Services Module.
    2.Run $cred=Get-Credential. When the cmdlet prompts you for credentials, type your Office 365 administration account credentials.
    3.Run Connect-MsolService -Credential $cred. This cmdlet connects you to Office 365. Creating a context that connects you to Office 365 is required before running any of the additional cmdlets installed by the tool.
    4.Run Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true .
    5.Run Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires to see whether the user’s password is set never expire.

    For your reference:
    Configure user passwords to never expire:
    http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh534387.aspx

    Richard and Jorge, thanks for your efforts.

    Thanks,
    Cherry Wang

All Replies
  • You will be better off downloading the MSO Powesrshell module, download link below (second part of page), plus commands;

    dcssouthwest-web.sharepoint.com/.../PowerShell.aspx

  • +1 you can use the regular PowerShell but the Import-Module MSOnline isn't available until you install the MSO PowerShell. Once it is installed either use the MSO shell straight out or use PowerShell 2.0 and start your syntax with 'Import-Module MSOnline'.

    Thanks,

    1 out of 1 people found this post helpful.

  • Hello Sami,

    From your screenshot, I see it is not Microsoft Online Services Module for Windows PowerShell. For it does not include Windows built-in PowerShell, I suggest you use Microsoft Online Services Module for Windows PowerShell to set user passwords to never expire.
    For how to install the Office 365 cmdlets:
    http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh124998.aspx#BKMK_install

    Besides, you can follow these steps after you install it.
    1.Open the Microsoft Online Services Module.
    2.Run $cred=Get-Credential. When the cmdlet prompts you for credentials, type your Office 365 administration account credentials.
    3.Run Connect-MsolService -Credential $cred. This cmdlet connects you to Office 365. Creating a context that connects you to Office 365 is required before running any of the additional cmdlets installed by the tool.
    4.Run Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true .
    5.Run Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires to see whether the user’s password is set never expire.

    For your reference:
    Configure user passwords to never expire:
    http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh534387.aspx

    Richard and Jorge, thanks for your efforts.

    Thanks,
    Cherry Wang

  • Hi Sami,

    How are things going? Is there any update about this issue?

    Thanks,
    Cherry Wang

  • Can you (or someone) verify that this will work with Office 365 P1 subscriptions? Most ot the powershell links refer to Enterprise accounts. I need to insure that password expiration is turned off for our P1 as well. Thanks, Mark K

  • Yes, it should work. I downloaded the MSO Powesrshell module and then followed the steps. At least the annoying pop-up reminding to re-set password from right down corner of my desktop has disappeared.

    I thing Microsoft should code some module to web control panel for this, since if a person has none experience of computers&programming, it might be too difficult to manage this expiration issue and IMHO nothing is more annoying than changing passwords time to time (and then type them in some post-it note to remember them...).

  • Hello Sami,

    Thanks for your reply, and sharing this experience in the forum. I believe this can benefit others who are facing the similar problems.

    Moreover, as for your concern, you can send us feedback by following the link to help us improve our products, and  I will appreciate your time and efforts:
    http://g.microsoftonline.com/0BX11EN/135

    If you have any other questions about Office 365, welcome to ask in the forum.

    Thanks,
    Cherry Wang