Creating computer accounts in Active Directory

At my organization, users have one computer they log into. To help keep track of who was on what computer, we put our user’s names in the description of each computer account. This becomes a little labor intensive when we get a shipment of new computers to be deployed, so of course we automate computer account creation.

The new computers are already assigned to users in a spreadsheet. I just created two text files one with a list of users and the other with the computers. This script reads a line from each file and then creates a computer account in AD with the name specified in the computers.txt file and with a description specified in the corresponding line of the users.txt file. This description could be anything. If you just need to create computer accounts, comment out the necessary lines. If you want each account to have the same description, set strUser to whatever you want and comment out the other lines.

If using two separate text files is too clunkly, there is an updated script that uses a csv file as input.