DocumentConfigMgrCB
DocumentConfigMgrCB copied to clipboard
Add Client count information
Information can be pulled from WMI pretty easily. Currently I have customers run a SQL query as an addition to this script for documentation of their environment.
ROOT\SMS\site_SEN -class SMS_CombinedDeviceResources | Where-Object {$_.IsClient -eq "True"}
Would be nice to have this from Single Primary as well as CAS with a count per site. This appears to work in my small CAS lab to grab count per site
$SiteCodes = gwmi -namespace ROOT\SMS\site_SEN -class SMS_SiteAndSubsites | Select -ExpandProperty SiteCode
ForEach ($SiteCode in $SiteCodes)
{
$Devices = gwmi -namespace ROOT\SMS\site_SEN -class SMS_CombinedDeviceResources | Where-Object {$_.IsClient -eq "True" -and $_.SiteCode -eq $SiteCode}
Write-Host $SiteCode $Devices.Count
}
We already get client counts from the built in collections, all systems, etc. What is the benefit of another count of devices?