Skip to content

Instantly share code, notes, and snippets.

@clly
Created April 12, 2012 20:37
Show Gist options
  • Save clly/2370812 to your computer and use it in GitHub Desktop.
Save clly/2370812 to your computer and use it in GitHub Desktop.
Reset user password
Function ResetPassword() {
$a = Get-Module activedirectory
if($a) {
Import-Module activedirectory -force
}
$server = ""
$ProgressPreference = "SilentlyContinue"
import-module activedirectory
$ProgressPreference = "Continue"
$username = Read-Host "What is your username: "
Set-AdAccountPassword -identity $username -Reset -Server $server
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment