I would like to create a script that does the following
1) Creates a new user
2) Prompts for username and password (also checks if user already exists)
3) Checks what groups are available in the AD (distro, security)
4) A prompt asks what groups you would like the user added to
5) Email is sent to an email with a summary of the username, password and groups
I know that this sounds like a lot but I thought if we could all have some input we could create a script that would actually save a lot of people some time.
The main issue that I am having is how to pull up a list of security/distro groups from active directory and then be able to select them/type them into a prompt.
Any and all assistance is much appreciated.
There is a variable option called "Prompt When Procedure is Scheduled" (in K2) which allows you to enter variable details every time you run the script/procedure, Also you would want to use the managed variables to configure stuff like DOMAIN name against the machine groups.
Most of this can be done via the NET USER and NET GROUPS commands via Kaseya scripts against the domain controller agent. For the groups this would be a little more difficult and I suspect that you would want to make separate procedures for each level of access you would want to assign and make another to apply custom memberships if/as required.
If the memberships are different for each site then you would want to create managed variables for each level (e.g.: Sales, Management, Accounts, etc...) and populate them as required or you will need to standardize your sites' groups to make it work with your scrips.
Did you ever get a procedure to do this? We need the exact same thing. If so, can you share your procedure?