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 / SR Display Formatted Text.rdl
Created September 26, 2019 12:48
SEC Bitlocker Compliance and Policy.rdl subreport. Displays properly formatted text for the bitlocker policy.
<?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>Sub report for displaying formatted text.</Description>
<Author>Ioan Popovici @ SCCM-Zone.com</Author>
<AutoRefresh>0</AutoRefresh>
<ReportSections>
<ReportSection>
<Body>
<ReportItems>
<Textbox Name="TXB_XML">
@Ioan-Popovici
Ioan-Popovici / SEC Bitlocker Compliance and Policy.rdl
Last active September 26, 2019 12:46
Gets the BitLocker compliance and policy with SCCM custom HWI extensions
<?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 BitLocker status and policy information by computer name. Note that hardware extensions are needed for this report.</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 / HWI DEF Win32Reg_BitlockerPolicy.mof
Created September 26, 2019 12:34
SCCM HWI Extension definitions for BitLocker Policy
//——————————————— // BitLocker Policy Definitions //———————————————
// Set default Namespace and delete the Win32Reg_BitLockerPolicy if it already exists
//#PRAGMA Namespace ("\\\\.\\Root\\CIMv2\\SMS")
//#PRAGMA DeleteClass ("Win32Reg_BitLockerPolicy", NOFAIL)
//-- Create WMI class
//- Class Qualifiers
[
Description ("The Win32Reg_BitLockerPolicy class contains information about the BitLocker Policy. You can use this information for BitLocker reporting."): ToInstance,
@Ioan-Popovici
Ioan-Popovici / HWI DEF Win32_EncryptableVolume_Ext.mof
Last active September 26, 2019 12:36
SCCM HWI Extension definitions for BitLocker Status
//——————————————— // BitLocker Status Definitions //———————————————
//-- Set default Namespace and delete the Win32_EncryptableVolume_Ext if it already exists. Use only inside of Configuration.mof
//#PRAGMA Namespace ("\\\\.\\Root\\CIMv2\\SMS")
//#PRAGMA DeleteClass ("Win32_EncryptableVolume_Ext", NOFAIL)
//-- Create custom class
//- Class Qualifiers
[
Description ("The Win32_EncryptableVolume_Ext class contains information about the BitLocker status. You can use this information for BitLocker reporting."): ToInstance,

Keybase proof

I hereby claim:

  • I am ioan-popovici on github.
  • I am ioanpopovici (https://keybase.io/ioanpopovici) on keybase.
  • I have a public key whose fingerprint is F0FD 54F5 DE1A 325D 8474 CA62 FE1A 5505 3EEA 4CBB

To claim this, I am signing this object:

@Ioan-Popovici
Ioan-Popovici / GetSQLProductKey.vb
Last active July 14, 2023 10:29
Gets SQL product key from a binary string array.
'.SYNOPSIS
' Gets SQL product key.
'.DESCRIPTION
' Gets SQL product key from a binary string array.
'.PARAMETER astrBinaryKey
' Specifies the obfuscated key.
'.PARAMETER intVersion
' Specifies the SQL version.
'.EXAMPLE
' Code.GetSQLProductKey(Fields!SomeField.Value, 12) (SSRS)
@Ioan-Popovici
Ioan-Popovici / usp_PivotWithDynamicColumns.sql
Last active July 14, 2023 10:33
Pivots with dynamic columns using dynamic SQL to get the pivot columns.
/*
.SYNOPSIS
Pivots with dynamic columns.
.DESCRIPTION
Pivots with dynamic columns using dynamic SQL to get the pivot columns.
.PARAMETER TableName
Specifies the source pivot table name.
.PARAMETER NonPivotedColumn
Specifies the non pivoded column name.
.PARAMETER DynamicColumn
@Ioan-Popovici
Ioan-Popovici / SW SQL Server Products.sql
Last active July 14, 2023 10:39
Gets SQL product info, id and product key.
/*
.SYNOPSIS
Gets SQL product info.
.DESCRIPTION
Gets SQL product info, id and product key.
.NOTES
Created by Ioan Popovici.
Requires the usp_PivotWithDynamicColumns stored procedure (SQL Support Functions).
Requires SQL Property and ProductID HWI extensions.
Part of a report should not be run separately.
@Ioan-Popovici
Ioan-Popovici / HWI EXT SQL Server Products.mof
Last active April 23, 2020 20:00
SCCM HWI Extension for SQL Server Products
//=====================================================
//---------------| SQL extension start |---------------
//=====================================================
//-- Set default WMI namespace
#Pragma NameSpace("\\\\.\\ROOT\\cimv2")
//----------| Old SQL extension cleanup |---------
//-- !! UNCOMMENT TO ACTIVATE !! (Remove '//' from '//#Pragma')
@Ioan-Popovici
Ioan-Popovici / HWI DEF SQL Server Products.mof
Last active March 29, 2020 10:44
SCCM HWI Definitions for SQL Server Products
//======================================================
//---------------| SQL definition start |---------------
//======================================================
//---------------| SQL 2019 definitions |---------------
[Dynamic, Provider("MS_VIEW_INSTANCE_PROVIDER"),
SMS_Report(true),
SMS_Group_Name("SQL 2019 Property"),
SMS_Class_ID("EXT|SQL_2019_PROPERTY|1.0")]