Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This script helps to join the machine to the domain local and if you want to do it remotely you can combined this script using invoke-command
$credential = New-Object System.Management.Automation.PsCredential("coex\administrator", (ConvertTo-SecureString "P@ssw0rd <mailto:P@ssw0rd>" -AsPlainText -Force))
Add-Computer -DomainName "coex.com" -Credential $credential -passthru
restart-computer