How Many computers you’re managed ?
when did you checked last time ?
are all the computers object on your directory are “alive” ?
first thing first ..
load the Active Directory Module
Note: Since Powershell V.3 the module of Active Directory will be loaded automatically if you’ll just enter a command from this module.
But we like to help it out.
lets store the results in a Variable Array so we can use it again … and again..
now we can view the results by typing the variable $list ,and we can also can count the number of objects we got returned from the command
we ran by the “Count” option..
All Together –
#Get All Computers Objects on ActiveDirectory -
$list = Get-ADComputer -Filter 'ObjectClass -eq "Computer"' | Select Name
Related Post: Test-Connection