Hi, this is great however is there anyway it can check if the sAMAccountName is unique and if not add a number to the end until it is?
I am trying to set the samAccountName per our company's standard which is first five characters of last name and first character of first name. I enabled the XML switch for LastNameFirstIn
itail in the hopes of using $SurName = $txtLastName.te xt.substring(0, 5) It actually creates the samAccountName as I want to but I get errors every time I type the first name or last name - Roughly Line 142 (I have added other items so lines numbers may be off) Exception calling "Substring" with "2" argument(s): "Index and length must refer to a location within the string.
How to add Email Address to the GUI?
Great tool, Kudos. But I noticed that the Manager field is not present. Can you please add? Thank you, Niles
Exception calling "Add" with "1" argument(s): "Object reference not set to an i nstance of an object." At line:261 char:35 + $User.SubItems.
Add <<<< ($SubItem) + CategoryInfo : NotSpecified: (:) , MethodInvocatio nException + FullyQualifiedE rrorId : DotNetMethodExc eption Thanks
Can someone help me with this warning message whiles trying to import the users. "You are using an older version of the Option file. Please generate a new Option file and transfer your settings" Need help Thanks
hello, I have been utilizing this tool for more than 2 weeks now. made my life easier on the school network with student accounts. However, I am wondering if there is any way to add more OU Paths, departments and address or states options to choose from. I am able to add tow OU paths, but none after that. Our organization has over 35 separate dept. groups and adding these each would help make life easier and cut my time in half. I have looked over the coding, but being newbie to scripting, i am getting no-where. any help would be greatly appreciated. thanks, Vince
:( figured it out, my issue was not that i couldn't add anymore OU paths, one of my paths had an ampersand & killing the process. now figure out how to exclude that as a string only... hmmmm
a path includes the & sign. what can i do to tell the script to not run the & in background? Path of OU: <Path>OU=MyOU,O
U=Boys & Girls Club,OU=Domain, DC=domain,DC=do main</Path> please help anybody? thanks
Take a look at this link. It has an excellent explanation for how to escape special characters http://ss64.com
HI Mate, Did you ever get a fix for this? I am completely stumped. Powershell is great, but can't believe the headache an "&" creates!
Edit, answered my own question. It's actually got to do with XML. If you have an OU with an "&" in it's DN, you'll have to tell XML to use & e.g. ou=customer & community in AD is ou =customer & community in XML, so it can tell the PS side of things that it's actually customer & community. Learn something new everyday. Hope this helps somebody
I just found this script and already know it will save me hours when creating users for our company. I do have some questions though, first are we able modify the user after we import the csv file? We put the prefix of Dr. before our doctors and want to be able to make this change without changing the script. Another question is instead of the drop down for the decription and display name, can it directly pull from the csv file instead? All assistance is extremely appreciated. Jay
Hello, I'm getting the error at the bottom. What does this mean? New-ADUser : Directory object not found At C:\Users\eric.t
urner\Documents \Active Directory\New User\ANUC.ps1:3 77 char:3 + New-ADUser @User -ErrorVariable ADError + ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (CN=Test Smith,O...kosof t,DC=local:Stri ng) [New-ADUser], ADIdentityNotFo undException + FullyQualifiedE rrorId : ActiveDirectory Cmdlet:Microsof t.ActiveDirecto ry.Management.A DIdentityNotFou ndException,M icrosoft.Active Directory.Manag ement.Commands. NewADUser
Did you ever get any help? im getting the same error and would like to find out what im doing wrong.