Created
October 30, 2019 02:32
-
-
Save Arefu/19e567870367452ad533af7178ed4b54 to your computer and use it in GitHub Desktop.
Set Exam Account Passwords
This file contains hidden or 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
[INT]$Count = Read-Host -Prompt "How Many Passwords?" | |
[INT]$Token = 1 | |
[STRING]$Url = "https://www.dinopass.com/password/simple" | |
do | |
{ | |
$Password = (Get-Culture).TextInfo.ToTitleCase((Invoke-WebRequest -UseBasicParsing -Uri $Url).Content) | |
#$Password = ConvertTo-SecureString $Password -AsPlainText -Force | |
Set-ADAccountPassword -Reset -NewPassword $(ConvertTo-SecureString $($Password) -AsPlainText -Force) -Identity $("Exam"+$Token) | |
Write-Host "Exam$Token - $Password" | |
$Token++ | |
} while($Token -le $Count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment