Showing posts with label client health. Show all posts
Showing posts with label client health. Show all posts

Wednesday, December 7, 2022

Setting Peer Download options for SCCM boundary groups using Powershell

 If you have more than just a few boundary groups you have probably wanted a way to quickly set these options across all of them.  I suggest setting the options for your VPN boundary group(s) first. For VPN you probably want to prefer cloud based sources and not use peer downloads at all (to prevent peering with internal computers).  Once you have that set then you can run this little gem to set all of the others for what I believe is the best settings.  Of course you can modify it if you think other settings are best.

Here you go:

<#
.Synopsis
   Set SCCM Boundary Group Peer Cache options to Allow peer cache downloads within this Boundary Group but restrict downloads to peers within the same subnet.
.DESCRIPTION
   Use this in order to quickly change the peer cache options for a set of boundary groups.  The more boundary groups you have
   in your organization, the more beneficial this becomes.
   The flags (at time of writing) that you will see in the boundary groups are:
   0 - Allow peer downloads in this boundary group (only first check box is checked)
   1 - Do not allow peer downloads in this boundary group (no check boxes are checked)
   2 - Allow peer downloads in this boundary group but During peer downloads only use peers within the same subnet (first two check boxes are checked)
   9 - Prefer cloud based sources over on-premises sources and Do not allow peer downloads in this boundary group (only last check box is checked)
   I have not experimented to find out what results come from other combinations of check-boxes.
#>

#Change testmode to false to save the changes
$testmode=$false

#The Configuration Manager site code
$sitecode="ABC"

#The Configuration Manager Primary Server
$SMSProvider="SCCMserver.domain.com"

#the flag you want to set
$newflag=2
$BoundaryGroups = (get-wmiobject -Namespace root\sms\site_$sitecode -Class SMS_BoundaryGroup -computername $SMSProvider) | Where-Object {($_.Flags -NE 2) -and ($_.Flags -le 2)}
Foreach ($BoundaryGroup in $BoundaryGroups) {
    write-host "Setting $($BoundaryGroup.name) flags to $newflag (previously $($BoundaryGroup.flags))"
    $BoundaryGroup.Flags = $newflag
    Try {
        If (-not $testmode) {
            $result=$BoundaryGroup.Put()
            write-host "saved" -ForegroundColor green
        }
    } Catch {
        write-host "failed to set flag" -ForegroundColor red
    }
}

Tuesday, June 14, 2016

Client Health Collections

My Client Health Collections

The source that I used to use for client health collections has disappeared from the interwebs so I had to build my own.  I had someone mention that they used to use client health collections but have stopped doing so as more recent SCCM versions do a much better job of self-correcting.  While I agree that SCCM has gotten better at detecting and correcting health problems, it has not eliminated them.  If you don't know where on this spectrum your clients are at then it is far more difficult to troubleshoot problems.  So, I still believe that these are quite useful.  I still find duplicate computer names and duplicate GUIDs.  I still find missing hardware and software inventories as well as failures to heartbeat.  And, of course, I find things that SCCM can't auto-correct like missing clients, disabled services, and pending reboot.  If you trust SCCM to correct all of these and just assume everything is working nicely then you will end up with surprises ranging from deployment failures to surprise reboots.  Better to know ahead of time than to be surprised.

Cheater files are located here.  They include a powershell script to import collections from a .csv file (bonus, you can use it to create any collections you want) and a .csv with the definitions for all of these colllections.  As always, disclaimer, never blindly run anything that you find on the interwebs.  Look them over first to be sure that they will do what you think they should do.

  1. Scope
Healthy Collection
  • Name = "01. Healthy - Scope - Devices in Scope"
  • Comment = "Checks for proper OS.  Discovered items like EMC Celera or UNIX systems are not in scope"
  • Query Limited to = "All Systems"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%windows%"
Unhealthy Collection
  • Name = "01. Ignored - Scope - Devices Not in Scope"
  • Comment = "These do not have a standard Windows OS on them."
  • Query Limited to = "All Systems"
  • Query Statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion not like "%Windows%"

  1. Obsolescence
Healthy Collection
  • Name = "02. Healthy - Obsolescence - Device Not Obsolete"
  • Comment = "These devices are discovered in both SCCM and AD"
  • Query Limited to = "01. Healthy - Scope - Devices in Scope"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%windows%" and SMS_R_System.Obsolete = "0"
Unhealthy Collection
  • Name = "02. Unhealthy - Obsolescence - Device Is Obsolete"
  • Comment = "These devices are no longer in Active Directory.  They probably don't exist on the network anymore."
  • Query Limited to = "01. Healthy - Scope - Devices in Scope"
  • Query Statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%windows%" and (SMS_R_System.Obsolete != "0" or SMS_R_System.Obsolete is null )

  1. Client
Healthy Collection
  • Name = "03. Healthy - Client - SCCM Client is Installed"
  • Comment = "These devices have an SCCM client installed.  This is the baseline for what SCCM should be able to manage."
  • Query Limited to = "02. Healthy - Obsolescence - Device Not Obsolete"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1"
Unhealthy Collection
  • Name = "03. Unhealthy - Client - SCCM Client Not Installed"
  • Comment = "These devices do not have a client installed.  They cannot be managed without a client."
  • Query Limited to = "02. Healthy - Obsolescence - Device Not Obsolete"
  • Query Statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.OperatingSystemNameandVersion like "%windows%" and (SMS_R_System.Client = "0" or SMS_R_System.Client is null )

  1. Activity
Healthy Collection
  • Name = "04. Healthy - Activity - Client Active"
  • Comment = "These clients have provided some status to SCCM within the last 30 days."
  • Query Limited to = "03. Healthy - Client - SCCM Client is Installed"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_CH_ClientSummary on SMS_G_System_CH_ClientSummary.ResourceId = SMS_R_System.ResourceId where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and SMS_R_System.Active = "1"
Unhealthy Collection
  • Name = "04. Unhealthy - Activity - Client Inactive"
  • Comment = "These clients have not provided any status to SCCM within the last 30 days."
  • Query Limited to = "03. Healthy - Client - SCCM Client is Installed"
  • Query Statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_CH_ClientSummary on SMS_G_System_CH_ClientSummary.ResourceId = SMS_R_System.ResourceId where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and (SMS_R_System.Active != "1" or SMS_R_System.Active is null ) 

  1. Duplicate Name
Healthy Collection
  • Name = "05. Healthy - Duplicate Name - Name Not Duplicated"
  • Comment = "The device names of these clients are not duplicated on any known systems."
  • Query Limited to = "04. Healthy - Activity - Client Active"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and SMS_R_System.Active = "1"and SMS_R_System.Name not in (select r.Name from  SMS_R_System as r full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId full join SMS_R_System as s2 on s2.Name = s1.Name where s1.Client = 1 and s1.Obsolete = "0" and s1.Name = s2.Name and s1.ResourceId != s2.ResourceId)
Unhealthy Collection
  • Name = "05. Unhealthy - Duplicate Name - Name Duplicated"
  • Comment = "These device names are duplicated, this can cause problems targeting devices by name."
  • Query Limited to = "All Systems"
  • Query Statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and SMS_R_System.Active = "1" and SMS_R_System.Name in (select r.Name from  SMS_R_System as r full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId full join SMS_R_System as s2 on s2.Name = s1.Name where s1.Client = 1 and s1.Obsolete = "0" and s1.Name = s2.Name and s1.ResourceId != s2.ResourceId)

  1. Duplicate GUID
Healthy Collection
  • Name = "06. Healthy - Duplicate GUID - GUID Not Duplicated"
  • Comment = "These SCCM GUIDs are not duplicated on any active system."
  • Query Limited to = "05. Healthy - Duplicate Name - Name Not Duplicated"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and SMS_R_System.Active = "1" and SMS_R_System.Name not in (select r.Name from  SMS_R_System as r full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId full join SMS_R_System as s2 on s2.Name = s1.Name where s1.Client = 1 and s1.Obsolete = "0" and s1.SMSUniqueIdentifier = s2.SMSUniqueIdentifier and s1.ResourceId != s2.ResourceId)
Unhealthy Collection
  • Name = "06. Unhealthy - Duplicate GUID - GUID Duplicated"
  • Comment = "These SCCM GUIDs are duplicated, usually caused by bad imaging practices"
  • Query Limited to = "All Systems"
  • Query Statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and SMS_R_System.Active = "1" and SMS_R_System.Name in (select r.Name from  SMS_R_System as r full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId full join SMS_R_System as s2 on s2.Name = s1.Name where s1.Client = 1 and s1.Obsolete = "0" and s1.SMSUniqueIdentifier = s2.SMSUniqueIdentifier and s1.ResourceId != s2.ResourceId)

  1. Hardware Inventory
Healthy Collection
  • Name = "07. Healthy - HINV - Hardware Inventoried in last 14 days"
  • Comment = "These devices have had their hardware inventoried recently."
  • Query Limited to = "06. Healthy - Duplicate GUID - GUID Not Duplicated"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_WORKSTATION_STATUS.LastHardwareScan >= DateAdd(dd,-14,GetDate())
Unhealthy Collection
  • Name = "07. Unhealthy - HINV - Hardware Not Inventoried in last 14 days"
  • Comment = "These devices have not had their hardware inventoried recently.  May indicate stale accounts, communication issues, or client issues."
  • Query Limited to = "06. Healthy - Duplicate GUID - GUID Not Duplicated"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_WORKSTATION_STATUS.LastHardwareScan < DateAdd(dd,-14,GetDate())

  1. Software Inventory
Healthy Collection
  • Name = "08. Healthy - SINV - Software Inventoried in last 45 days"
  • Comment = "Software inventory is recent"
  • Query Limited to = "07. Healthy - HINV - Hardware Inventoried in last 14 days"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_LastSoftwareScan on SMS_G_System_LastSoftwareScan.ResourceId = SMS_R_System.ResourceId where SMS_G_System_LastSoftwareScan.LastScanDate >= DateAdd(dd,-45,GetDate())
Unhealthy Collection
  • Name = "08. Unhealthy - SINV - Software Not Inventoried in last 45 days"
  • Comment = "Software has not been inventoried recently."
  • Query Limited to = "07. Healthy - HINV - Hardware Inventoried in last 14 days"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_LastSoftwareScan on SMS_G_System_LastSoftwareScan.ResourceId = SMS_R_System.ResourceId where SMS_G_System_LastSoftwareScan.LastScanDate < DateAdd(dd,-45,GetDate())

  1. Heartbeat
Healthy Collection
  • Name = "09. Healthy - Heartbeat - Heartbeat is recent"
  • Comment = "These clients have responded to heartbeat discovery in the last 23 days"
  • Query Limited to = "08. Healthy - SINV - Software Inventoried in last 45 days"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where AgentName in ("Heartbeat Discovery") and DATEDIFF(day,AgentTime,GetDate())<=23
Unhealthy Collection
  • Name = "09. Unhealthy - Heartbeat - No Heartbeat in 23 days"
  • Comment = "These clients have not responded to heartbeat discovery in over 23 days"
  • Query Limited to = "08. Healthy - SINV - Software Inventoried in last 45 days"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where AgentName in ("Heartbeat Discovery") and DATEDIFF(day,AgentTime,GetDate())>23

  1. SCCM Client Version
Healthy Collection (the exact version needs to be maintained)
  • Name = "10. Healthy - Client Version - Client is current"
  • Comment = "The SCCM client is on a recent version"
  • Query Limited to = "09. Healthy - Heartbeat - Heartbeat is recent"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and SMS_R_System.Active = "1" and SMS_R_System.ClientVersion >= "5.00.9068.1008"
Unhealthy Collection
  • Name = "10. Unhealthy - Client Version - Client is old"
  • Comment = "The SCCM client is on an old version.  This can cause issues with deployments and can be an indicator of more severe underlying problems."
  • Query Limited to = "09. Healthy - Heartbeat - Heartbeat is recent"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = "0" and SMS_R_System.Client = "1" and SMS_R_System.Active = "1" and SMS_R_System.ClientVersion < "5.00.9068.1008"

  1. WUAU Service
Healthy Collection
  • Name = "11. Healthy - WUAU Service - WUAU enabled"
  • Comment = "WUAU Service is not disabled."
  • Query Limited to = "10. Healthy - Client Version - Client is current"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Client = "1" and SMS_R_System.Obsolete = "0" and SMS_R_System.Active = "1" and SMS_G_System_SERVICE.Name = "wuauserv" and SMS_G_System_SERVICE.StartMode != "Disabled"
Unhealthy Collection
  • Name = "11. Unhealthy - WUAU Service - WUAU disabled"
  • Comment = "WUAU Service is set to disabled.  Software updates cannot be installed on these devices."
  • Query Limited to = "10. Healthy - Client Version - Client is current"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Client = "1" and SMS_R_System.Obsolete = "0" and SMS_R_System.Active = "1" and SMS_G_System_SERVICE.Name = "wuauserv" and SMS_G_System_SERVICE.StartMode = "Disabled"

  1. WUAU Version
Healthy Collection
  • Name = "12. Healthy - WUAU Version - WUAU Version Current"
  • Comment = "The WUAU service has been updated within the last six months"
  • Query Limited to = "11. Healthy - WUAU Service - WUAU enabled"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_WINDOWSUPDATEAGENTVERSION on SMS_G_System_WINDOWSUPDATEAGENTVERSION.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Client = "1" and SMS_R_System.Obsolete = "0" and SMS_R_System.Active = "1" and SMS_G_System_WINDOWSUPDATEAGENTVERSION.Version is not null  and SMS_G_System_WINDOWSUPDATEAGENTVERSION.TimeStamp >= DateAdd(dd,-185,GetDate())
Unhealthy Collection
  • Name = "12. Unhealthy - WUAU Version - WUAU Version Old"
  • Comment = "WUAU service has not been updated in over six months.  This means that they may need a servicing stack update.  If the servicing stack is too far behind they will not be able to apply updates."
  • Query Limited to = "11. Healthy - WUAU Service - WUAU enabled"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_WINDOWSUPDATEAGENTVERSION on SMS_G_System_WINDOWSUPDATEAGENTVERSION.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Client = "1" and SMS_R_System.Obsolete = "0" and SMS_R_System.Active = "1" and SMS_G_System_WINDOWSUPDATEAGENTVERSION.Version is not null  and SMS_G_System_WINDOWSUPDATEAGENTVERSION.TimeStamp < DateAdd(dd,-185,GetDate())

  1. MSIExec Service
Healthy Collection
  • Name = "13. Healthy - Windows Installer - Windows Installer enabled"
  • Comment = "Windows Installer service is not disabled"
  • Query Limited to = "10. Healthy - Client Version - Client is current"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Client = "1" and SMS_R_System.Obsolete = "0" and SMS_R_System.Active = "1" and SMS_G_System_SERVICE.Name = "msiserver" and SMS_G_System_SERVICE.StartMode != "Disabled"
Unhealthy Collection
  • Name = "13. Unhealthy - Windows Installer - Windows Installer disabled"
  • Comment = "Windows Installer Service is disabled.  This means that anything that uses MSIExec.exe will be unable to run (like any .msi, .msu or .msp file)."
  • Query Limited to = "10. Healthy - Client Version - Client is current"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Client = "1" and SMS_R_System.Obsolete = "0" and SMS_R_System.Active = "1" and SMS_G_System_SERVICE.Name = "msiserver" and SMS_G_System_SERVICE.StartMode = "Disabled"

  1. Pending Reboot
Healthy Collection
  • Name = "14. Healthy - Pending Reboot - Compliant"
  • Comment = "These clients are compliant with the pending reboot CI.    Whenever the CI's version changes it will receive a new CIID and that new CIID must be updated in this collection's query."
  • Query Limited to = "10. Healthy - Client Version - Client is current"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System join sms_combineddeviceresources on sms_combineddeviceresources.resourceid = sms_r_system.resourceid where sms_combineddeviceresources.clientstate = 0
Unhealthy Collection
  • Name = "14. Unhealthy - Pending Reboot - Not Compliant or Error"
  • Comment = "These clients are non-compliant, errored, or not detected for the pending reboot CI.  Whenever the CI's version changes it will receive a new CIID and that new CIID must be updated in this collection's query."

  • Query Limited to = "10. Healthy - Client Version - Client is current"
  • Query statement
    • select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System join sms_combineddeviceresources on sms_combineddeviceresources.resourceid = sms_r_system.resourceid where sms_combineddeviceresources.clientstate != 0