Exchange 365 password never expires

Import-Module msonline
$cred = Get-Credential
Connect-MsolService -cred $cred
Get-Command –Module msonline

Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

發佈留言

*