Created
May 7, 2017 09:09
-
-
Save marckean/7d276bf585d5bea2dbdf0f6d31d8aeef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the new Azure AD module - as administrator | |
Install-Module AzureAD | |
$user = "powershell" | |
# Connect to the AzureAD | |
Connect-AzureAD -TenantId 'h8c94336-3a68-12d7-h456-736458936j21' | |
# Get & see the Password Policy - it might exist already | |
(Get-AzureADUser -SearchString $user).PasswordPolicies | |
# Add the password policy to Disable Password Expiration | |
Get-AzureADUser -SearchString $user | Set-AzureADUser -PasswordPolicies DisablePasswordExpiration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment