Canberra, Australia
To be provided
To be provided

Join Computer to Domain via Powershell

Harmik Batth Tech Blog

Join Computer to Domain via Powershell

Join Computer to Domain

Joining a computer to domain via PowerShell is whole lot easier than regular way of GUI based.

To Join a Computer to domain,

Add-Computer -DomainName “HarmikBatth.Lab”


Enter the user credentials, which has permission to join the computer to a domain.

You can also mention the “-Restart”, which will automatically restart the computer on successfully joining to domain.

Once the computer is restarted, it is joined to domain and you can login using domain credentials.

Join Computer to Domain in Specific OU

Above command by default will put this computer into Default Computers OU. if you have requirements to move or place this computer directly into specific OU, you can follow the below procedure to do so.

Add-Computer -DomainName HarmikBatth.Lab -OUPath OU=testOU,DC=domain,DC=Domain,DC=com

The local computer is added to the organizational unit (OU) in the directory that is specified by the OUPath parameter



Comments: 2

  1. 76Garry says:

    Hello admin, i must say you have hi quality content here.
    Your website should go viral. You need initial traffic only.
    How to get it? Search for; Mertiso’s tips go viral

Add your comment