Skip to main content
AD Academy
Back to all recipes
Level: JuniorLast updated:

Join a computer to the domain into a specific OU

Add-Computer -DomainName corp.local `
  -OUPath "OU=Laptops,OU=IT,DC=corp,DC=local" `
  -Credential (Get-Credential) -Restart

Why it works this way

Without an OU the computer lands in Computers and misses the department GPOs.

Watch out

  • Before joining, client DNS must point at a DC.
  • After reboot check gpresult /r that policy arrived.

Related events