Add Computer Object & Change Group to join domain

I’m looking to add a computer object into Active Directory and specify a different group that can join it to the domain other than “Default: Domain Admins”.

AD version of what I'm trying to do

Your image is not visible to us. You will get help from below link for sure.

This is the AD version of what I’m trying to do.



Use the ADAC (Active Directory Administrative Console) and click through what you are trying to do. It will write the PS code for you, that you can later tweak as needed.

Introduction to Active Directory Administrative Center Enhancements (Level 100)

Learning PowerShell with Active Directory Administrative Center (PowerShell History Viewer)

Step-By-Step: Utilizing PowerShell History Viewer in Windows Server 2012 R2

Use Active Directory Administrative Center to Create PowerShell Commands in Windows Server 2012

Great tool! Unfortunately, it doesn’t give any Powershell code when changing the user or group to join a domain.

Discussions and answers and a pre-built script to help you regarding your use case.

It doesn’t look simple. Here’s a blog about it. The MG IT SERVICE blog: "The following user or group can join this computer to a domain" using Powershell

I wish there was a “sysinternals process monitor” for active directory, that shows what objects are changing (hmmm… AD Explorer - Windows Sysinternals | Microsoft Docs). Or a book on automating active directory with powershell.

As for —

book on automating active directory with powershell.

From the list of ones I have and have used in my library. Some are a bit dated, but still gives you starting and thinking points.

Automating Active Directory with Windows PowerShell 2.0

Inside Active Directory, Second Edition

Active Directory with PowerShell

Mastering Active Directory: Understand the Core Functionalities of Active Directory Services Using Microsoft Server 2016 and PowerShell