Add-Computer
I was building some test machines yesterday and needed to add them to the domain. As they were Windows 2008 R2 with PowerShell v2 I decided to try Add-Computer.
Add-Computer -DomainName mydomain -Credential mydomain\myaccount; restart-computer
You will be prompted for the password.
This only works on the local computer – you can’t add a remote machine.
Simple and effective command.