DocumentConfigMgrCB icon indicating copy to clipboard operation
DocumentConfigMgrCB copied to clipboard

Add Client count information

Open abndrew82 opened this issue 2 years ago • 1 comments

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
}

abndrew82 avatar Jan 11 '23 15:01 abndrew82

We already get client counts from the built in collections, all systems, etc. What is the benefit of another count of devices?

paulwetter avatar Feb 25 '23 20:02 paulwetter