Computer name in MDT like : Prefix-"4digit Increasing number"

Ali Pakzad 26 Reputation points
2021-07-27T20:31:11.253+00:00

Good day, Dear support team,

In MDT, I need to set automatic computer names on devices while they're joined to the domain, like Prefix"4digit increasing number"

In AD, I have an OU named Workstations,

Inside Workstations, I have my computers,

All computer names start with "computer" and a 4 digit number, For example, Computer0001, Computer0002 ...

Now MDT deploys the windows, how can I config it to check the last computer name in that OU and set the next available number to the newly imaged computer?

In WDS, I used Computer %04#% and it was working. but in MDT it's not working.

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
919 questions
0 comments No comments
{count} votes

Accepted answer
  1. Simon Ren-MSFT 38,096 Reputation points Microsoft Vendor
    2021-07-28T08:23:03.96+00:00

    Hi,

    Thanks for posting in Microsoft Q&A forum.

    Per my experience, we could try to use the MDT database to generate computer names based on prefix and a sequence number. For more detailed information, please refer to:

    Generate computer names in MDT 2012/2013 based on prefix and a sequence number
    Use the MDT database to stage Windows 10 deployment information
    Note: The non-Microsoft link is just for your reference.

    Best regards,
    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ali Pakzad 26 Reputation points
    2021-08-03T18:36:43.107+00:00

    Hello @Simon Ren-MSFT

    Thank you for the references.
    I made it work after a lot of changes that were not mentioned in both guides.

    At least it works now!

    Thanks


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.