Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Getting Powershell to request information for variables.

$
0
0

I currently have a Powershell script that I use for creating Users in Active Directory.  I mainly use it for batch jobs when customers want to add 5 or more users..   It works perfectly for this as I simply have to type in the Script name and the name of the csv file that has the list of users in it.  

What I would like to also be able to do is execute the script without a csv file name and then have the script ask me a number of questions.  IE, User First name, Last name, UserID, password, and email.  All things I already have in the csv file format..  

Could someone point me in the right direction that helps explain how this can be done in Powershell?  I know I could plug this information into paramaters and input it as part of the command line, but I'd really like to be able to give this to some of my customer admins so they can add users themselves.  So it needs to be pretty simple and straight forward.. 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles