Using PowerShell - Count of computers in a specific OU

preview_player
Показать описание
Using PowerShell - Count of computers in a specific OU

1. Prepare

2. Step by step : Count of computers in Servers and Clients OU

- DC31 : Count of computers in Servers and Clients OU

+ Using interface :

+ Using Windows PowerShell

+ Start - Windows PowerShell, type :

+ Get-AdComputer -Filter * -SearchBase 'OU=Servers,DC=Yi,DC=VN' | Select Name # Display computers belong Servers OU

+ (Get-AdComputer -Filter * -SearchBase 'OU=Servers,DC=Yi,DC=VN' | Select Name).Count # Count computers belong Servers OU

+ Get-AdComputer -Filter * -SearchBase 'OU=Clients,DC=Yi,DC=VN' | Select Name # Display computers belong Clients OU

+ (Get-AdComputer -Filter * -SearchBase 'OU=Clients,DC=Yi,DC=VN' | Select Name).Count # Count computers belong Clients OU
Рекомендации по теме
visit shbcf.ru