Skip to content

Add Client count information #102

@abndrew82

Description

@abndrew82

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions