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 / Set-CSVMaintenanceWindowsConfiguration.csv
Created January 4, 2019 18:58
Sets maintenance windows using a CSV file. Configuration file template.
CollectionName Date StartTime StopTime RemoveExisting ApplyTo
MWT.TST.Servers.Scripted.GroupA 2017-09-21 09:00 10:00 Yes TaskSequences
MWT.TST.Servers.Scripted.GroupB 2017-09-21 00:30 04:30 Yes TaskSequences
@Ioan-Popovici
Ioan-Popovici / Set-CSVMaintenanceWindowsMailSettings.csv
Created January 4, 2019 18:56
Sets maintenance windows using a CSV file. Mail Settings file template.
SendMail From To CC SMTPServer SMTPPort
Yes SCCM <[email protected]> [email protected] [email protected] mail.test.com 25
@Ioan-Popovici
Ioan-Popovici / Add-CMDeviceDirectMemebershipRulesSettings.csv
Created January 3, 2019 16:06
Adds devices from a txt file to a SCCM device collection. Mail csv configuration file.
SendMail From To CC SMTPServer SMTPPort
Yes SCCM <[email protected]> [email protected] [email protected] mail.test.com 25
@Ioan-Popovici
Ioan-Popovici / Add-CMDeviceDirectMemebershipRules.csv
Last active January 3, 2019 16:06
Adds devices from a txt file to a SCCM device collection. Rule csv configuration file.
DeviceName CollectionName
TST01 MWT.TST.Servers.Scripted.GroupA
TST02 MWT.TST.Servers.Scripted.GroupB
@Ioan-Popovici
Ioan-Popovici / Disable-CMDeviceCollectionPushSettings.csv
Last active January 3, 2019 15:38
Disables SCCM push install for a specified collection configuration template csv file
SendMail From To CC SMTPServer SMTPPort
Yes SCCM <[email protected]> [email protected] [email protected] mail.test.com 25
@Ioan-Popovici
Ioan-Popovici / SW Installed Software by Computer or Publisher.sql
Last active December 13, 2018 17:56
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.
/*
.SYNOPSIS
Lists the installed software.
.DESCRIPTION
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.
.NOTES
Created by Ioan Popovici.
Requires ufn_csv_String_Parser custom function.
Part of a report should not be run separately.
@Ioan-Popovici
Ioan-Popovici / telegraf.conf
Created November 30, 2018 19:12
Call a powershell script in telegraf.conf
[[inputs.exec]]
commands = ["powershell C:/Telegraf_Scripts/Export-CMDBToTelegraf.ps1 -Server 'SomeSCCMDBServer' -Database 'CM_SomeSiteCode' -ServerCollectionID 'SomeServerCollectionID' -WorkstationCollectionID 'SomeWorkstationCollectionID'"]
interval = "20s"
timeout = "30s"
data_format = "influx"
@Ioan-Popovici
Ioan-Popovici / Export-CMDBToTelegraf.ps1
Last active July 15, 2019 13:53
Exports data from the SCCM database and formats it for telegraf.
<#
.SYNOPSIS
Exports data from the SCCM database.
.DESCRIPTION
Exports data from the SCCM database and formats it for telegraf.
.PARAMETER Server
Specifies the server name.
.PARAMETER Database
Specifies the database name.
.PARAMETER ServerCollectionID
@Ioan-Popovici
Ioan-Popovici / HWI EXT Win32_EncryptableVolume_Ext.mof
Last active September 26, 2019 12:36
SCCM HWI Extension for BitLocker Status
//——————————————— // BitLocker Status //———————————————
//-- Set default Namespace and delete the Win32_EncryptableVolume_Ext if it already exists
#PRAGMA Namespace ("\\\\.\\Root\\CIMv2")
#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,
@Ioan-Popovici
Ioan-Popovici / HWI EXT Win32Reg_BitlockerPolicy.mof
Last active September 26, 2019 12:35
SCCM HWI Extension for BitLocker Policy
//——————————————— // BitLocker Policy //———————————————
//-- Set default Namespace and delete the Win32Reg_BitLockerPolicy if it already exists
#PRAGMA Namespace ("\\\\.\\Root\\CIMv2")
#PRAGMA DeleteClass ("Win32Reg_BitLockerPolicy", NOFAIL)
//-- Create custom class
//- Class properties
[DYNPROPS]
Class Win32Reg_BitLockerPolicy