troubleshooting Question

Script to name computer with user input and add to AD

Avatar of Irrylyn
Irrylyn asked on
ProgrammingVB ScriptIT Administration
26 Comments1 Solution1902 ViewsLast Modified:
Hi experts!

I have a zinger that will really show your skills!

I've found a lot of scripts online that can be used during a Bare Metal OS Deployment Task Sequence in SCCM that will prompt the user for the Computer Name.  I'm looking for something a little more robust.

Our Naming Convention for computers is <Location><Org><xWKx><4 numbers>

So for one Org (we'll call it Sales) that has 3 Workstations, they would be named:


> LOC is always the same.
> Org depends on the organization the machine belongs to.
> XWKX is always the same
> The 4 numbers are just the next available (Not already used) in Active Directory.

With me so far?  Ok, here's what I'm looking for:

I want a script to add to the Task sequence that will prompt the user for their Org only.

Then I want it to create the computer name by adding <LOC><User input for Org><xWKx><next available number in AD>

Oh, and once it has a name, can it add the computer to Active Directory?  (Ideally for this part, the OU it would be created in would also be dependant on the Org, but we can have an Imaging OU and just put them all in there to move them later)

Anything close to this would be a huge deal!

Thank you and I hope to see some ideas soon!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 26 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 26 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros