This file contains 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
CollID | CollType | FilterName | UpdatesLast | UpdatesOverall | SCEP | |
---|---|---|---|---|---|---|
XXX00019 | Workstations | Workstations | True | True | True | |
XXX0001A | Servers | Servers | True | True | True | |
XXX00018 | Servers | SubCollection1 | True | True | True | |
XXX00015 | Servers | SubCollection2 | True | False | True |
This file contains 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
[[inputs.exec]] | |
commands = ["powershell C:/Telegraf_Scripts/updates.ps1"] | |
interval = "40s" | |
timeout = "25s" | |
data_format = "influx" |
This file contains 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; |
This file contains 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
#Parameters | |
$SQL_Server = '<your SCCM SQL server>' | |
$Database ='<your SCCM Database>' | |
$Server_Collection = '<your server collection ID>' | |
$Workstation_Collection = '<your workstation collection ID>' | |
#Clients queries | |
$sqlCmd = " | |
DECLARE @date DATETIME; | |
SELECT @date = DATEADD([hh], -12, GETDATE()); |
This file contains 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
############################################################################### | |
# INPUTS # | |
############################################################################### | |
# Windows Performance Counters plugin. | |
# These are the recommended method of monitoring system metrics on windows, | |
# as the regular system plugins (inputs.cpu, inputs.mem, etc.) rely on WMI, | |
# which utilize more system resources. | |
# | |
# See more configuration examples at: | |
# https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters |
This file contains 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
[[inputs.exec]] | |
commands = ["powershell C:/Telegraf_Scripts/Clients.ps1"] | |
interval = "20s" | |
timeout = "30s" | |
data_format = "influx" |
This file contains 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
SELECT [aa].[AssignmentID] | |
FROM [v_ApplicationAssignment] [aa] | |
WHERE [ApplicationName] = @AppInfo | |
AND [aa].[CollectionID] = @CollID; |
This file contains 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
SELECT DISTINCT | |
[aa].[ApplicationName] | |
FROM [v_ApplicationAssignment] [aa] | |
ORDER BY 1; |
This file contains 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
SELECT DISTINCT | |
[aa].[CollectionID], | |
[aa].[CollectionName] | |
FROM [v_ApplicationAssignment] [aa] | |
WHERE [aa].[ApplicationName] = @AppInfo | |
ORDER BY 2; |
This file contains 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
DECLARE @PolicyModelID INT; | |
SELECT @PolicyModelID = [PolicyModelID] | |
FROM [fn_rbac_DeploymentSummary]([dbo].[fn_LShortNameToLCID](@locale), @UserSIDs) | |
WHERE [AssignmentID] = @AssignmentID; | |
SELECT * | |
INTO [Deployment0] | |
FROM | |
( | |
SELECT [AppState].[MachineName], |
NewerOlder