Add domain user to local admin group with MDT

Mike_Doe 1 Reputation point
2021-04-29T12:11:50.177+00:00

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.

Regards
Michael

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).
514 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,730 questions
No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Simon Ren-MSFT 13,221 Reputation points Microsoft Employee
    2021-04-30T06:00:04.957+00:00

    Hi,

    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,
    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.
    https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html


  2. Anonymous
    2021-05-20T10:04:45.677+00:00

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

    No comments

  3. snork13 1 Reputation point
    2021-05-21T18:49:39.027+00:00

    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.

    No comments