Skip to content

Instantly share code, notes, and snippets.

@heywoodlh
Last active September 29, 2017 16:58
Show Gist options
  • Save heywoodlh/cfa3eb5ff69486d7cca01e95eb1524cf to your computer and use it in GitHub Desktop.
Save heywoodlh/cfa3eb5ff69486d7cca01e95eb1524cf to your computer and use it in GitHub Desktop.
Active Directory Password Changing Script
$domainServer = 'ad.mydomain.com'
$username = Read-Host -Prompt 'Username: '
$newPassword = Read-Host -AsSecureString -Prompt 'Password: '
Set-ADAccountPassword -Identity $username -Reset -NewPassword $newPassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment