I want to have a PowerShell script that runs automatically when I insert a USB drive. Here's exactly what I want to see happen:
Step 1. -- Insert USB
Step 2. -- A script runs automatically that pops up a window requesting I enter my credentials
Step 3. -- Those credentials are verified against Active Directory
Step 4. -- If the credentials are good, then a program is executed (let's say outlook.exe)
Step 5. -- If the credentials are bad, it prompts me a maximum of 3 times before NOT running the program and displaying a bad credentials message or something to that effect.
Info: The program (outlook or anything), PowerShell, and the script will all be on the USB drive.
Please forgive me if something like this is already posted but I did a search and couldn't find exactly what I was looking for. Any help would be greatly appreciated and I promise to contribute when I become good at this.