|
|
this is the .csv file I am using. Domain,Path,FirstName,LastName ,Office,Title,D escription,Depa rtment,Company, Phone,StreetAdd ress,City,State ,PostalCode,Pas sword,sAMAccoun tName,userPrinc ipalName,Displa yName ,,test1,user,,, ,,,,,,,,P@ssw0r d1,,, ,,test2,user,,, ,,,,,,,,P@ssw0r d1,,, ,,test3,user,,, ,,,,,,,,P@ssw0r d1,,, ,,test4,user,,, ,,,,,,,,P@ssw0r d1,,, I am attempting to create the accounts within CN=Users,DC=tld om,DC=local. I am using the default container within AD. I have not created an OU=Users and do not wish to.
How can I run this script to create 100 test users named testuser1 thru testuser100? Is it possible for the script to loop and create each new test user with the next user name (testuser1, then testuser2, then testuser3, and continue until it creates testuser 100 then stops)?
Pls disregard this posting. I have found a different format as a resolution. thanks
Hi Rich, i need to add force password change = no and password never expires = yes can you tell me where i have to add these options in script and csv file ??
Hi Rich, I'd like to ask you, if you wrote the GUI by yourself, or if you used an application to design it? Please reply. BR
I need to add certain groups to users that I create, How do I add that to the script?
Figured it out with some help, added Add-ADGroupMember GROUPNAME $samAccountName to line 380
Hello ... I LOVE this script. Thank you! Is there an easy change I can make so that the default is for the user password to never expire? It's for a test lab, so I don't want it to have to be changed. Thank you!
I answered it myself. In case any other PS newbies want to know, I added PasswordNeverExpires = $true to the $User definitions.
I tried running it on Windows 2008 R2 and I got the following error: . : File C:\Deploy_FD\ANUC.ps1 cannot be loaded. The file C:\Deploy_FD\AN UC.ps1 is not digitally signed. The script will not execute on the system. For more information, see about_Execution _Policies at http://go.micro soft.com/fwlink /?LinkID=135170 . At line:1 char:3 + . 'C:\Deploy_FD\A NUC.ps1' + ~~~~~~~~~~~~~~~ ~~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityExcep tion + FullyQualifiedE rrorId : UnauthorizedAcc ess
This is fantastic by the way. I've taken out the defaults and set the xml file so that it only uses what I specify in the csv file. If I click submit on each one manually, it works. But if I click, Submit all, it fails. Any ideas on why that might be?
Rich, This is an awsome piece of work... thanks for giving to the community.... I've noticed that if I import users from a CSV file that does not specify the sAMAccount, UPN or Display name then they get generated as expected based on the settings in the xml options file, however if I first create a user in single mode (obviously those attributes are correctly configured) and then switch to CSV Mode, all of the CSV users would be created using the values that were last specified when in Single User Mode. How do we clear those values when clicking the CSV Mode button? Regards Steve
Rich, I think I've managed to come up with a solution to my question... if you add the following after line 420 wich containes:- $formMode_Click={ $txtFirstName.T ext = "" # Clears FirstName on form when toggling between "CSV Mode" & "Single-User Mode" $txtLastName.Te xt = "" # Clears FirstName on form when toggling between "CSV Mode" & "Single-User Mode" then when changing between the two modes the values are cleared. Regards Steve