Created
April 12, 2012 20:37
-
-
Save clly/2370812 to your computer and use it in GitHub Desktop.
Reset user password
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
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