0

I'm looking to develop a PowerShell script that asks users for a password and if the correct password is entered users skip to a different point in the script. If an incorrect password is used or if nothing is entered users must load the standard program. I've attempted to use the timeout /T function however it won't run until after I've requested users to input the password and the clock starts after.

I'm aware I could user Group Policies and different scripts for different users however my boss is looking for this route and this route only.

I appreciate all your help!

  • Welcome to SO. As you wil be told. SO is not a script-writing service. SO has rules: [Provide MRE](https://stackoverflow.com/help/minimal-reproducible-example) --- [How to ask](https://stackoverflow.com/help/how-to-ask) --- [Don't ask](https://stackoverflow.com/help/dont-ask) --- [Proper Topic](https://stackoverflow.com/help/on-topic) --- [Why not upload images of code/errors?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) --- [format your post properly](https://stackoverflow.com/help/formatting) – postanote Aug 17 '22 at 23:51
  • Also, your boss is asking for risk/operational theater. This is not a thing, since you'd be capturing cleartext user passwords unless you are providing the password randomly up front. Where are getting a password the user typed in to compare against what is valid or not? Yet, this means storing clear text passwords in your script or some file you need to retrieve. I am not really sure what the TimeOut this is about at all. – postanote Aug 18 '22 at 01:15

0 Answers0