Add domain user to local admin group with MDT

Mike_Doe 1 Reputation point

Hi everyone,

I have a working task sequence which install Windows 10 pretty well inside a domain and I would like to add this feature : AdminAccounts.

The rule "SkipAdminAccounts=NO" is set, the page appears correctly during the Wizard, but ir does nothing.

I haven't see any error or warning in any logs (or maybe I didn't search in the right place).

Maybe I'm missing the right task in my sequence ?

If someone could help me, I'll appreciate.


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).
794 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,877 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Simon Ren-MSFT 28,406 Reputation points Microsoft Vendor


    Thanks for posting in Microsoft MECM Q&A forum.

    1, We could try to create a .bat file like this:

    net user "owner" "mypassword" /add
    net localgroup "Administrators" "owner" /add
    WMIC USERACCOUNT WHERE "Name='owner'" SET PasswordExpires=FALSE
    WMIC USERACCOUNT WHERE "Name='owner'" SET Passwordchangeable=FALSE
    Then import this.bat file as an application in MDT. The command line for the application will be filename.bat

    2, We could also try to prestage the computer under Advanced Configuration>Computers. Add the computer and go into Properties. On the Administrators tab you can add an existing local user on the image or domain user as an admin.

    Thanks for your time.

    Best regards,

    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.

  2. Anonymous

    which local admin group?
    I have an script which add the user to local group

    0 comments No comments

  3. snork13 1 Reputation point

    adding user to local admin group is a built in feature, you add user and they will be admin of the device if needed, you just need to set up the custom setting correctly.

    0 comments No comments