powershell get all computers in ou code example Example: powershell get all computers in ou Get-ADComputer -Filter * -SearchBase "OU=IT, DC=contoso, DC=com"