**You must have the following installed.
*Microsoft Online Services Module for Windows PowerShell
*Microsoft Online Services Sign-In Assistant
Import-Module msonline
$cred = Get-Credential
Connect-MsolService -cred $cred
**Get a list of users and their password expiration status**
Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires
**Set all users passwords not to expire**
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
**Get a list of commands**
Get-Command –Module msonline
No comments:
Post a Comment