Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Validate Get-Credential Input

$
0
0

Please note I am very new to PowerShell and I am sure there is a better way to go about this...

I have written a basic script for unlocking and resetting passwords in AD. It lists all the accounts currently locked out and prompts for the account to modify. It then asks to reset the password or just unlock the users account. Surprisingly everything is working as it should. My concern is that I am prompting for the user to enter their credentials at the beginning of the script, it then uses this as needed for the rest of the script. So I wonder if the user mistypes the password could the script possibly lock their account out? Is there a way to check the Get-credential input against AD?


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>