Joining a domain with Powershell
quick scripts to join an AD domain
Thu, 04 Oct 2018
Just wanted to share my favorite settings for the powershell Add-Computer command. The options I always specify are the domain name(required), credential(required), OUPath to put my computer in its proper AD container, NewName to set the computer name to the proper string, Restart and Force just to save myself from having to restart. The command is listed below
Add-Computer -DomainName "mydomain.com" -OUPath "OU=Desktops,DC=mydomain,DC=com" -NewName "publicDesktop" -credential "mydomain\administrator" -restart -force