JAEN

PowerShell

Add-Computer

CautionJoin a domain

Add-Computer -DomainName <domain> -Restart

Joins AD; -OUPath drops the account in the right OU from the start — the kitting finale, scripted. Windows PowerShell 5.1 only; not available in PowerShell 7.

Examples

  • Add-Computer -DomainName corp.local -OUPath 'OU=PCs,DC=corp,DC=local' -RestartJoin into a specific OU

Syntax

Add-Computer -DomainName d [-OUPath dn] [-Credential cred] [-Restart]

Before you run it

Needs credentials and a reboot.

Related commands

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store