Skip to content

Instantly share code, notes, and snippets.

View Ioan-Popovici's full-sized avatar

Ioan Popovici Ioan-Popovici

View GitHub Profile
@Ioan-Popovici
Ioan-Popovici / SU Compliance by Device.sql
Last active August 1, 2022 04:15
Gets the software update compliance in SCCM by Device and All Updates.
/*
.SYNOPSIS
Gets the software update compliance for a device in SCCM.
.DESCRIPTION
Gets the software update compliance in SCCM by Device and All Updates.
.NOTES
Requires SQL 2012 R2.
Part of a report should not be run separately.
*/
@Ioan-Popovici
Ioan-Popovici / SU Compliance by Collection.sql
Last active May 18, 2020 13:19
Gets the software update compliance in SCCM by Collection and All Updates.
/*
.SYNOPSIS
Gets the software update compliance for a Collection in SCCM.
.DESCRIPTION
Gets the software update compliance in SCCM by Collection and All Updates.
.NOTES
Requires SQL 2012 R2.
Requires ufn_CM_GetNextMaintenanceWindow sql helper function in order to display the next maintenance window.
Requires SELECT access on vSMS_AutoDeployments for smsschm_users (SCCM Reporting).
Part of a report should not be run separately.
@Ioan-Popovici
Ioan-Popovici / GetHealthStates.vb
Last active May 18, 2020 13:18
Gets statically defined health states for a specified bitmask.
'.SYNOPSIS
' Gets statically defined health states.
'.DESCRIPTION
' Gets statically defined health states for a specified bitmask.
'.PARAMETER intBitMask
' Specifies the bitmask to apply.
'.EXAMPLE
' Code.GetHealthStates(Fields!SomeField.Value) (SSRS)
'.EXAMPLE
' GetHealthStates(16) (VB.Net)
/*
.SYNOPSIS
Gets the next maintenance window from a schedule token.
.DESCRIPTION
Gets the next maintenance window from a schedule token.
.PARAMETER ScheduleToken
Specifies the schedule token.
.PARAMETER RecurrenceType
Specifies the maintenance window recurrence type.
.EXAMPLE
@Ioan-Popovici
Ioan-Popovici / DE Software Deployments by Device or User.rdl
Created September 27, 2019 17:08
Lists the Application or Package Deployments for a Device or User Collection
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition">
<Description>Lists the application or package deployments for a device or user collection</Description>
<Author>Ioan Popovici @https:\\SCCM.Zone</Author>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="CMSQLDatabase">
<DataSourceReference>/ConfigMgr_HUB/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>11111111-1111-1111-1111-111111111111</rd:DataSourceID>
@Ioan-Popovici
Ioan-Popovici / SIT Maintenance Windows by Collection and Type.rdl
Created September 27, 2019 16:09
Lists all SCCM maintenance windows with Start Time and Duration
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<Description>Lists all maintenance windows by collection, type and name. For filtering wildcards "*" must be used. By default all maintenance windows will be displayed.</Description>
<Author>Popovici Ioan @ SCCM-Zone.com</Author>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSource">
<DataSourceReference>/ConfigMgr_A01/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>33f94ec3-1e39-4466-a6ee-65619da20a87</rd:DataSourceID>
@Ioan-Popovici
Ioan-Popovici / SW Installed Software by User Selection.rdl
Created September 27, 2019 15:01
Lists the installed software by user selection (Device, Publisher or Name). Supports filtering and exclusions by multiple software names using comma separated values and sql wildcards.
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition">
<Description>Lists installed software by user selection (Device, Publisher or Software). Supports filtering and exclusions by multiple software names using comma separated values and sql wildcards. Supported wildcards: '%', '[]', '_'. Example: Like = 'Adobe%,7zip'; NotLike = 'Adobe Acrobat%,winzip'. Don't abuse wildcards, they are very resource intensive.</Description>
<Author>Ioan Popovici @SCCM-Zone.com</Author>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="CMSQLDatabase">
<DataSourceReference>/ConfigMgr_HUB/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>11111111-1111-1111-1111-111111111111</rd:DataSourceI
@Ioan-Popovici
Ioan-Popovici / SIT Devices by Boundary and Network.rdl
Last active September 27, 2019 15:01
List devices by boundary group, boundary and network information.
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition">
<Description>List devices by boundary group, boundary and network information.</Description>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="CMSQLDatabase">
<DataSourceReference>/ConfigMgr_HUB/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>11111111-1111-1111-1111-111111111111</rd:DataSourceID>
</DataSource>
@Ioan-Popovici
Ioan-Popovici / SW SQL Server Products.rdl
Last active July 14, 2023 10:40
Gets SQL product info, id and product key
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition">
<Description>Lists SQL version and product key information.</Description>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="CMSQLDatabase">
<Transaction>true</Transaction>
<DataSourceReference>/ConfigMgr_ULB/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}</DataSourceReference>
<rd:SecurityType>Integrated</rd:SecurityType>
<rd:DataSourceID>6fe7a601-d088-4e03-b266-36dd4f559a6d</rd:DataSourceID>
@Ioan-Popovici
Ioan-Popovici / SU Compliance by Computer Classification and Severity.rdl
Last active September 27, 2019 15:01
Gets the software update compliance in SCCM by computer, classification and severity
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<Description>Lists software update compliance by computer, classification and severity. Note: Only updates present in the SCCM database are displayed. This affects both the installed and required update information displayed. Default exclusions are for antivirus definitions.</Description>
<Author>Popovici Ioan @ SCCM-Zone.com</Author>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSource">
<DataSourceReference>/ConfigMgr_A01/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>33f94ec3-1e39-4466-a6ee-65619da20a87</rd:DataSourceID>