Mostrando postagens com marcador sccm. Mostrar todas as postagens
Mostrando postagens com marcador sccm. Mostrar todas as postagens

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

quarta-feira, 20 de fevereiro de 2019

How to use Powershell script inside SCCM program.

Just use this syntax:

powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File \\local\folder1\folder2\folder3\scripts\Start-PowershellScript.ps1

First create a program with program wizard without this ugly command line, just select script name normally. After the program has been created, in properties panel put the command line.


Decorator Powershell Design Patterns

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