Several ways to add computer to a domain

by [Published on 24 Sept. 2014 / Last Updated on 24 Sept. 2014]

Tip explains several ways to add a computer to a domain.

There are several ways to add a computer to domain. You can use either NetDom or Add-Computer PowerShell cmdlet. This tip explains how to add local computer to an Active Directory domain using Add-Computer PowerShell cmdlet.

First command adds local computer to the MyDomain.com domain and then restarts the computer.

  1. Add-Computer -DomainName MyDomain.com –Restart
  2. Add-Computer -DomainName MyDomain.com -Server MyDomain.com\DC1 -Passthru -Verbose

Second command adds the local computer to the MyDomain.com domain by using the MyDomain.com\DC1 domain controller. The command also uses the -PassThru and -Verbose parameters to get detailed information about the results of the command.

About Nirmal Sharma

Nirmal is a MCSEx3, MCITP and was awarded Microsoft MVP award in Directory Services. He is specialized in Directory Services, Microsoft Clustering, Hyper-V, SQL and Exchange and has been involved in Microsoft Technologies since 1994. In his spare time, he offers technical help by writing tips and articles. Nirmal can be reached at nirmal_sharma@mvps.org.

See Also


The Author — Nirmal Sharma

Nirmal Sharma avatar

Nirmal Sharma is a MCSEx3, MCITP, and was awarded Microsoft MVP in Directory Services. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles for various online communities. Nirmal can also be found contributing to PowerShell based Dynamic Packs for ADHealthProf.ITDynamicPacks.Net solutions.

Featured Links