move the default variable to a more visible position

This commit is contained in:
Andreas Zweili 2017-07-15 13:08:19 +02:00
parent e782225e8d
commit 5e49ee7a85
1 changed files with 3 additions and 1 deletions

View File

@ -9,12 +9,14 @@ Catch
Break
}
#Specify your default password here
$default_password = 'default-password'
function Reset-Password
{
Try
{
$username = Read-Host 'Please enter a user name'
$default_password = 'default-password'
Unlock-ADAccount -Identity $username
Set-ADAccountPassword -Identity $username -Reset -NewPassword (
ConvertTo-SecureString -AsPlainText $default_password -Force