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