How to add a machine to Microsoft Windows Domain with PowerShell

Subscribe to my newsletter and never miss my upcoming articles

I've been really trying to learn more PowerShell and use it more frequently. I recently decided to script adding a server to a domain via PowerShell.

Here is the command-

add-computerdomainname ad.contoso.com -Credential AD\\adminuser -restartforce

Once entered you will be prompted to enter admin credentials.

No Comments Yet