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
 
 
 
 
 
(159)
100,074 times
Add to favorites
Active Directory
12/4/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • User logon name
    1 Posts | Last post Fri 4:56 AM
    • Dear Mr Prescott,
      
      Can we manually decide "User logon Name" using csv file?
      
      It seems that there is no way to put "User login name" into a csv.
      
      Thanks for your help.
      
      Cheers,
  • Configuration
    1 Posts | Last post November 12, 2016
    • ANIC.ps1 creates the initial configuration via an xml. While I try to implement the necessary ones for my organization, I remove some properties and add some others. Then I decided to create a configurator, which will include almost all of the properties Active Directory support. So the initial configuration xml file will be the product of a form mainly based on dozens of checkboxes for the admin to select those needed.. And the job of ANUC form would become only user creation. To help myself in finding features, I tried to create tabs just the same tabs in the AD Users and Computers' new user dialog form. But since I don't have Sapien's PrimalForms 2011 and use Powershell ISE to develop, I fucked it up after a while.
      
      Would you please add this in your roadmap? Can you add a initial configuration form?
  • CSV with comma values
    1 Posts | Last post August 25, 2016
    • Im not sure if i am doing this correctly, the "path" value contains commas. So that breaks the whole idea with csv.. If I encapsulate the value with hyphens It imports into the gui, but the powershell crashes..
  • Organisational Unit Friendly Name
    1 Posts | Last post July 28, 2016
    • Great Tool!  We have a complicated Organization unit structure and i ws wondering if ther is a way to use " friendly names "either changing someing in the XML file or the powershell script itself.
      
      ex: Marketing as friendly name that points to the Ou=user,Ou=marketing,dc=domain,dc=local
      
      Thank you for your time
  • Change XML file samAccountName
    1 Posts | Last post June 17, 2016
    • I'm testing your script to ad users to the AD.
      Looking good. Thanks for your work.
      
      I have a problem I can't solve right now, because of my lack of knowledge od XML programming
      1. Change the samAccountname to firstinitial + 4 characters of lastname + follow number e.g. jpete1
      
      Could anyone help?
      
      Regards
      
      Frans
  • Add Suffix with Last Name
    1 Posts | Last post June 07, 2016
    • is it possible to Add Suffix with Last Name if the user with the same last name exists. 
      
      for example: Paul Walker1 and if Paul Walker1 already exists it should create Paul Walker2. 
      
  • Add homedrive
    1 Posts | Last post March 03, 2016
    • Hi, great script! Is it possible in a later release to add home folder capability in the profile tab for the user? In the meanwhile does anyone no where in this script I can do it? I think something like this should do it:  
      Set-ADuser -Identity SamAccountName -HomeDrive "H:" -HomeDirectory "\\server\share\%UserName%"
      
      Erik
  • Unique sAMAccountName
    2 Posts | Last post January 26, 2016
    • 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?
    • Not sure if this has been answered but here's my crappy input..
      I haven't looked at this form yet (scanned the 1st 50 lines or so?) BUT I got around that one on my own version I made a little while back by creating a Function (Checksam) using ADSI Searcher and checking the result.
      # Function to check for SAM account name
      function checksam 
      {
          param ($findname)
          $check=[adsisearcher]"objectcategory=user"
          $check.filter="samaccountname=$findname"
          $check.findone()
      } #end function
      
      As Samaccountname is unique we only have to do a 'findone' so it's relatively quick. Based on the result you can take action, i.e if the name exists:
      if($result = checksam($samname))  #This executes the code below if there IS a match.
      { 
      DO something
      }
      
      I grab the name in an input box, split the string and build the SAM name by setting a new 'finished' string as the 1st char of the 1st chop and the whole of the last chop ("$1stchar + inputname[1]" the format I use is "INitial" so I simply use ). If there's a prob my 'do something' then get's the second intitial and adds that to the 1st $1stchar and then joins. I could do yet another test but. This is just for me really...so I don't, but you get the picture.
      It's not pretty but it helped me out at the time. I should revise it...
      The cleaner answer, using the above, would be to use a counter or 2 to decide on how many characters to grab and append and also where to point to once the snippet had run.
      You can use a counter in place of grabbing a character; test for existence; rinse and repeat.
      As I said above, I haven't looked at the form yet, just adding my tuppence.
  • New to reading script
    1 Posts | Last post December 19, 2015
  • Exchange 2012 Support
    4 Posts | Last post December 03, 2015
    • Just a small update, to allow this amazing script, immediatelly enable a Mailbox on the Exchange Server 2013:
      
      1) Download the script.
      2) Edit file: ANUC.ps1
      3) Insert, after line 379: else{$SB.Text = "$sAMAccountName created successfully."}
         the following code: Enable-Mailbox -Id $userPrincipalName -Database "MBX1 Database"
      
      TIP: if having problems, run the script in Exchange Shell and import ActiveDirectory Module
      TIP: change MBX1 Database, with your own Exchange Server environment :)
      
    • Another tip on this that I found.  If you are adding the users by importing a CSV and clicking Import All you need to add that same code after line 609 as well.
    • This a good instruction for information base on data collection,sometime the computer issue could happen, the properties can help resolve.
      
      https://docs.google.com/document/d/1TnYG18JtONh6-1Urls5Grty4WnWtfgQkGSUFIpjFpa0/edit?usp=sharing
      https://docs.google.com/document/d/1VC5FpvmD5NpuUcJCAlYRqOmKmE88u4G0Zvc7nTlxuRI/edit?usp=sharing
    • Any way to simply use the UPN to fill in the "E-Mail" field in AD for the user? Preferably with a custom domain name following the "@"
1 - 10 of 121 Items