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 / Disable-CMDeviceCollectionPush.ps1
Last active January 3, 2019 15:35
Disables SCCM push install for a specified collection using the ExcludeServers registry key.
<#
.SYNOPSIS
Disables SCCM push install for a specified collection.
.DESCRIPTION
Disables SCCM push install for a specified collection using the ExcludeServers registry key.
.PARAMETER CMSiteServer
Specifies the NetBIOS name of the SCCM Site Server.
.PARAMETER CMCollection
Specifies the Collection Name to exclude from Push Install.
.PARAMETER DeleteAllCollectionMembers
@Ioan-Popovici
Ioan-Popovici / Set-CSVMaintenanceWindows.ps1
Last active January 4, 2019 18:55
Sets maintenance windows using a CSV file and is triggered when the settings CSV file is saved. using file watcher.
<#
.SYNOPSIS
Sets maintenance windows using a CSV file.
.DESCRIPTION
Sets maintenance windows using a CSV file and is triggered when the settings CSV file is saved. using file watcher.
.EXAMPLE
Set-ClientMaintenanceWindows.ps1
.NOTES
Created by Ioan Popovici
Uses FileSystemWatcher to see when the CSV file is changed.
@Ioan-Popovici
Ioan-Popovici / Add-CMDeviceDirectMemebershipRules.ps1
Last active January 3, 2019 15:54
Adds devices from a txt file to a SCCM device collection, triggered when the txt file is saved.
<#
.SYNOPSIS
Adds devices from a txt file to a SCCM device collection.
.DESCRIPTION
Adds devices from a txt file to a SCCM device collection, triggered when the txt file is saved.
.EXAMPLE
Add-CMDeviceDirectMemebershipRules.ps1
.INPUTS
System.String
.OUTPUTS
@Ioan-Popovici
Ioan-Popovici / Get-SCEPDetectionLogs.ps1
Last active June 3, 2020 19:45
This PowerShell script is Get the SCEP Logs from SCCM DB and export them to a CSV file
<#
*********************************************************************************************************
* *
*** This PowerShell script is Get the SCEP Logs from SCCM DB and export them to a CSV file ***
* *
*********************************************************************************************************
* Created by Octavian Cordos, 2017-03-28 | Requirements: PowerShell 3.0, SQL PS commandlets *
* ======================================================================================================*
* Modified by | Date | Version | Comments *
*_______________________________________________________________________________________________________*
@Ioan-Popovici
Ioan-Popovici / nxlog.conf
Last active December 1, 2021 09:17
NXLog configuration for SCCM Logging
Define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension gelf>
Module xm_gelf
@Ioan-Popovici
Ioan-Popovici / Computer.Updates.UpdatesMissing.sql
Created June 2, 2017 18:35
Missing Updates SQL Query for Computer.Updates Report
DECLARE @AuthListLocalID AS int
SELECT @AuthListLocalID=CI_ID
FROM v_AuthListInfo
WHERE v_AuthListInfo.Ci_UniqueID=@AuthListID;
SELECT DISTINCT rs.NetBios_Name0 AS Name,
CASE
WHEN os.Caption0 LIKE '%2003%' THEN 'Windows 2003'
WHEN os.Caption0 LIKE '%2008R2%' THEN 'Windows 2008 R2'
@Ioan-Popovici
Ioan-Popovici / Computer.Updates.UpdatesToBeApplied.sql
Created June 2, 2017 18:37
Updates To Be Applied Query (UpdateGroup) for Computer.Update Report
DECLARE @AuthListLocalID AS int
SELECT @AuthListLocalID=CI_ID
FROM v_AuthListInfo
WHERE CI_UniqueID=@AuthListID
SELECT DISTINCT ui.BulletinID,
ui.ArticleID,
ui.Title,
a ui.Description,
ui.DateRevised,
CASE ui.Severity
@Ioan-Popovici
Ioan-Popovici / Start-WindowsCleanup.ps1
Last active September 26, 2024 21:30
Performs a windows cleanup by removing volume caches, update backups, update and CCM caches.
<#
.SYNOPSIS
Performs a windows cleanup.
.DESCRIPTION
Performs a windows cleanup by removing volume caches, update backups, update and CCM caches.
.PARAMETER CleanupOptions
Supported options:
"comCacheRepair" # Component Cache Repair
"comCacheCleanup" # Component Cache Cleanup
"volCacheCleanup" # Volume Cache Cleanup
@Ioan-Popovici
Ioan-Popovici / SU-Compliance-KBs_from_CSV.sql
Last active April 16, 2019 16:57
Lists the Compliance for Multiple KBs for a Collection using the Win32_QuickfixEngineering WMI Class.
/*
*********************************************************************************************************
* Created by Ioan Popovici, 2015-08-18 | Requirements: HWI - Win32_QuickfixEngineering WMI Class. *
* ======================================================================================================*
* Modified by | Date | Revision | Comments *
*_______________________________________________________________________________________________________*
* Ioan Popovici/Octavian Cordos | 2015-08-18 | v1.0 | First version *
*-------------------------------------------------------------------------------------------------------*
* *
*********************************************************************************************************
@Ioan-Popovici
Ioan-Popovici / ufn_csv_String_Parser.sql
Last active October 25, 2019 11:46
Parses a CSV string and returns individual substrings.
/*
.SYNOPSIS
Parses a CSV string.
.DESCRIPTION
Parses a CSV string and returns individual substrings.
.PARAMETER pInputString
Specifies the input string.
.PARAMETER pDelimiter
Specifies the delimiter.
.EXAMPLE