This short script will join a machine to your domain. This can be useful as a post start up script that will launch after a machine has been imaged.
$domain = "DOMAIN" $password = "PASSWORD HERE" | ConvertTo-SecureString -asPlainText -Force $username = "$domain\USERNAME HERE" $credential = New-Object System.Management.Automation.PSCredential($username,$password) Add-Computer -DomainName $domain -Credential $credential
Feel free to comment if you have any questions!