AzureAD Set User Password Expiration

From DFWLPiki
Revision as of 17:38, 6 January 2022 by Jhorne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Get-AzureADUser -ObjectId UPN | Select-Object UserprincipalName,@{N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}}
Set-AzureADUser -ObjectId UPN -PasswordPolicies DisablePasswordExpiration