Last active
January 16, 2019 09:36
-
-
Save DarkAllien/fb56df9f76affe45364a1729963bf295 to your computer and use it in GitHub Desktop.
Revisions
-
DarkAllien revised this gist
Jan 16, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ 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'; -
DarkAllien revised this gist
Jan 16, 2019 . 1 changed file with 10 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,25 +1,23 @@ BEGIN --replace all CM_XXX with your SCCM DB name DECLARE @UserSIDs VARCHAR(16); SELECT @UserSIDs = 'disabled'; -- Master 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'; -
DarkAllien created this gist
Jan 16, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ BEGIN --replace all CM_XXX with your SCCM DB name DELETE FROM [grafana].[dbo].[Servers] WHERE [filter] = 'Servers.Patching.Available.Last'; DECLARE @UserSIDs VARCHAR(16); SELECT @UserSIDs = 'disabled'; -- servers collection ID excluded from updates DECLARE @CollID VARCHAR(8)= 'XXX0012B'; -- srv patching available 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 -- (looking for SUG deployed as required in the environment to see the deviation) DECLARE @SUG TABLE([id] INT); INSERT INTO @SUG SELECT TOP 1 [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%') ORDER BY [datecreated] DESC;