How to configure user passwords to never expire in Office 365

How to configure user passwords to never expire in Office 365

User passwords expire on a regular basis in Office 365. As an admin, you can set a policy to make a user's password expire after a certain number of days. Users are notified to change their password before their password expires.

Admins can set passwords to expire anywhere between 14 and 730 days, and for Office 365 for enterprises pre-upgrade and Office 365 Enterprise and Office 365 Midsize Business after the service upgrade, you can set up user passwords to never expire.  

0 out of 1 people found this post helpful.

Sort by: Published Date | Most Recent | Most Useful
Comments
  • Hey hey

    I get this when entering the command:

    PS C:\Program Files (x86)\MigrationWiz\MigrationWiz PowerShell> Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

    The term 'Get-MSOLUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check th

    e spelling of the name, or if a path was included, verify that the path is correct and try again.

    At line:1 char:13

    + Get-MSOLUser <<<<  | Set-MsolUser -PasswordNeverExpires $true

       + CategoryInfo          : ObjectNotFound: (Get-MSOLUser:String) [], CommandNotFoundException

       + FullyQualifiedErrorId : CommandNotFoundException

    So i tred this:

    Get-User | Set-User -PasswordNeverExpires $true

    And gert this error:

    A positional parameter cannot be found that accepts argument 'True'.

       + CategoryInfo          : InvalidArgument: (:) [Set-User], ParameterBindingException

       + FullyQualifiedErrorId : PositionalParameterNotFound,Set-User

    Any takers?

    Thanks

    Mark

  • @Mark

    Are you sure you installed the remote powershell package specifically for O365? The regular PS package that comes with Windows doesn't know those commands I don' think.

Page 1 of 1 (2 items)