Tue. Feb 25th, 2020

Host your Website

Read and learn

Join a domain through powershell

1 min read

In this tutorial, I will show you how to join a domain through powershell.

Sometimes it can useful to add a computer to a domain using the command line, such as when no GUI is available (as is the case with Server Core), or just to expedite the process when configuring multiple computers. In this easy Ask the Admin, I’ll show you how to add one or more Windows 8.1 and Windows Server 2012 R2 PCs to a domain using PowerShell.

Performing a Domain Join Using PowerShell
Once you’ve established correct DNS resolution for the domain name, start a PowerShell prompt with local administrative privileges.
Press the Windows key to switch to the Start menu, type PowerShell and press CTRL+SHIFT+ENTER. If prompted, enter a local administrator username and password, or give consent to run PowerShell.
In the PowerShell prompt, type:
add-computer –domainname ad.contoso.com -Credential ADadminuser -restart –force
and press Enter. Enter a password for the domain administrator account when prompted.
The PC should now restart and be joined to the domain once it has restarted.

Copyright © All rights reserved. | Newsphere by AF themes.