Last active
January 16, 2019 09:36
-
-
Save DarkAllien/fb56df9f76affe45364a1729963bf295 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN | |
--replace all CM_XXX with your SCCM DB name | |
DECLARE @UserSIDs VARCHAR(16); | |
SELECT @UserSIDs = 'disabled'; | |
-- Master/Top servers collection ID with updates deployed as required | |
DECLARE @CollID VARCHAR(8)= 'XXX00111'; | |
DELETE FROM [grafana].[dbo].[Servers] | |
WHERE [filter] = 'Servers.Patching.Required.Overall'; | |
DECLARE @AuthListLocalID AS INT; | |
SELECT @AuthListLocalID = [CI_ID] | |
FROM [CM_XXX].[dbo].[v_AuthListInfo]; | |
-- Adjust this Software Update Group Name filter to fit your Naming Convention | |
DECLARE @SUG TABLE([id] INT); | |
INSERT INTO @SUG | |
SELECT [CI_ID] | |
FROM [CM_XXX].[dbo].[v_AuthListInfo] | |
WHERE([title] LIKE '%serv%req%month%' | |
AND [title] NOT LIKE '%office%' | |
AND [title] NOT LIKE '%pilot%' | |
AND [title] NOT LIKE '%TMP%') | |
OR [title] LIKE '%baseline'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment