Categories
How-To Technical

Tech Short: Using PowerShell to join Computer to AD Domain

Working on a server installation I decided to use a simple yet effective power-shell command to join a Windows Server 2012/R2 system to our domain.

For the sake of brevity lets just show you.

Requirements:

  • Admin access to the computer/server you are joining to the domain along with permissions in the AD domain to join machines
  • Connected to the network where the domain is accessible
  • Obtain an network ip address along with dns that can resolve the domain you are joining
  • PowerShell

Steps:

  1. Launch PowerShell as an Administrator
  2. Issue the following command example: Add-Computer -DomainName <domain name> -Restart
Add-Computer -DomainName jermsmit.com -Restart

You will be prompt for a username and password at this point. Enter in the correct credentials and soon after a restart will occur.

When you resume from the restart you can now log in on this workstation/server with domain credentials.

Additional info can be found on Technet

I hope you enjoyed this short, thanks for visiting – jermal

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.