quinta-feira, 21 de fevereiro de 2019

How to create a collection based on query based on a Configuration Baseline

Just create a normal collection and do not put any workstations inside.
After, select query and point to your configuration baseline, like this:


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_DCMDeploymentState 
               ON SMS_G_System_DCMDeploymentState.ResourceID = 
                  SMS_R_System.ResourceId 
WHERE  BaselineID = 
'ScopeId_F1C1683F-1FCE-49E8-8157-2FE966FFC39A/Baseline_64d60164-a57d-4d56-8e7c-2a4748cf7eb2' 
AND CollectionID = 'S0X00XXA' 
AND ComplianceState = 1 

The readable name of the compliance state. Possible values are:

0 Compliance State Unknown
1 Compliant
2 Non-Compliant
4 Error

Nenhum comentário:

Postar um comentário

Decorator Powershell Design Patterns

 Powershell Design Patterns Decorator ```powershell # Classe base 'Beverage' class Beverage {     [string]$description = "Unkno...