This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Unique Computer Name Generation

Hello, I am trying to lock down machine creation to a specific OU and would like to create the machine name with a unique number.

For example I would like to create the machine name with the name of the OU it will be placed in, followed by 3 unique numbers.  The generation policy does not allow me to create unique numbers as part of the computer name. 

I have to believe this is a pretty canned answer, but cannot seem to figure it out.  Any suggestions would be helpful.

Thanks,

Alex

  • Hello, Alex.

    You can create a canned (Property Generation and Validation) policy to enforce your naming convention, however if you wish the policy to assign a numerical/unique value automatically, then you're going to need to script it.

    The version of your rule that simply enforces your standard would look like this:

    • 'Name (ou)' of parent OU, followed by
    • '-', followed by
    • 3 characters [0-9] (required)

    In this case I put a hyphen separator between the parent OU name and the numerical requirement.

    If you're looking for the scripted version, there is some (very old) sample code posted here. What you're requesting is manageable and plausible: I've created similar, automatic name generation scripted policies before. Unfortunately they are highly customer-specific, hence are not/cannot be posted here. There may be other samples here in the forums that I didn't find in my quick search before posting this.

    Regards,
    Shawn.

  • Shawn, thank you for your answer.  I was hoping for an easier answer, but we scripted the solution as you suggested.

    Thank you again!

    Alex