Active Directory User Creation tool 1.2

One task that every systems administrator has to go through at some point is the creation of new user accounts. Powershell makes this process simple and adds additional functionality, such as the ability to set defaults and import users from CSV.

ANUC.ps1
 
 
 
 
 
4.2 Star
(167)
114,778 times
Add to favorites
Active Directory
12/4/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • A way to separate usernames by space, not fullstop?
    1 Posts | Last post February 15, 2018
    • Awesome script, saved my skin recently after I worked out how to properly edit the options file, however can't for the life of me work out how to set it so that all usernames are separated by a space, not a full-stop.
      
      I'm a novice PS user, but understand a bit of the Linux command line and some basic scripting stuff, so I did try and have a poke around to work out what was defaulting it to separating by full-stop, but couldn't quite get there.
      
      Any help graciously accepted!
      
      Cheers,
      
      Andrew
      
      TL;DR:
      I just want: "[Firstname] [Lastnme]" 
      but I get: "[Firstname].[Lastname]"
      
      even when manually editing the SAM Account Name field.
      
      
  • CSV Mode not populating correctly
    1 Posts | Last post February 14, 2018
    • When using CSV Mode to create users the email address field does not populate correctly.  It will put in the Office field in Active Directory instead of Email field.
  • More of a request
    2 Posts | Last post January 27, 2018
    • Would it be possible for the script to write to a log file for what it is doing? Specifically, I am looking for a way to know what PS command it is attempting to run for the add user process. This would be very helpful when troubleshooting syntax errors while importing CSVs. As often times it is just a typo, that doesn't stick out.
    • I added a write-host line in front of the new-ADUser section of code so I could see what it was doing.
      
      Add the following to at line 377 and 607 (without the quotes). Put one line above the New-ADUser line.
      "Write-Host New-ADUser @User"
  • Another Request
    1 Posts | Last post January 27, 2018
    • Can anyone get this to work on child domains? I am running into an issue where if the computer is not joined to the same domain as the target I get "the server is unwilling to process the request". Again this is just a computer joined to a different domain in the same forest as the target domain, with fully enterprise admin rights. it just so happens that the target domain is the same domain as the logged in user as well.
  • Can I modify this to pull in a text file of 'x' user names?
    1 Posts | Last post December 02, 2017
    • This script is a wonderful thing! Use it daily. Wondering how hard it would be to import a text file with multiple users rather than having to enter them one by one.
      I'd perform the edit, just wondering where to start. I've been reading the Don Jones books on PS Tool Creation and Bruce Payette's Windows PowerShell in Action. 
  • samAccountName & userPrinciaplName in tiny
    2 Posts | Last post November 22, 2017
    • Hi guys,
      
      Someone can help me to edit the script to have samaccountName in tiny instead of uppercase (initial) ?
      
      Many thanks for your help.
    • in line 146 to 149 use the .ToLower()
      
      "FirstNameLastName"    {"{0}{1}" -f ($GivenName).tolower()[0],$Surname.tolower()}
              "FirstInitialLastName"  {"{0}{1}" -f ($GivenName)[0],$SurName}
              "LastNameFirstInitial"  {"{0}{1}" -f $SurName,($GivenName)[0]}
              Default                 {"{0}{1}" -f ($GivenName.tolower())[0],$SurName.tolower()}
  • Need to Add a Field to theANUCusers.csv File
    1 Posts | Last post October 11, 2017
    • I need to add users email addresses to their accounts when they are created, however that field is not in the ANUCusers.csv file.  How can I add that in?  When I add a column to the file, the script fails.
  • two doamin
    1 Posts | Last post September 19, 2017
    • Hi,
      
      I have added two domains to XML, specified OUs. My main domain lets say is called: first.local
      Here I can create user no problem using your Powershell tool. Once I select second.local, OU and try to create the user I'm receiving an error:
      
      New-ADUser : The server is unwilling to process the request
      At C:\Users\sebastiandar\Desktop\Untitled1.ps1:384 char:3
      +         New-ADUser @User -ErrorVariable ADError
      +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (CN=seb test23,O...second,DC=com:String) [New-ADUser], ADException
          + FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.NewADUser
      
      I have try to add a line in the script to load the AD module as a user from secon.local domain but still error persist even though I'm able to authenticate.
      
      
      
  • username lowercase
    1 Posts | Last post September 15, 2017
    • Hi all,
      
      For a specific reason, I need to have the username in lowercase.
      What I must change to have the username, samaccountName and userPrincipalName in lowercase ?
      
      Many thanks for your help
  • Server 2016
    1 Posts | Last post August 29, 2017
    • Works like a charm for something last updated in 2012!
1 - 10 of 136 Items