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 KB Compliance by ArticleID.sql
Created April 16, 2019 16:59
Lists the software update compliance for a CSV KB list by ArticleID and Client State.
/*
.SYNOPSIS
Lists the software update compliance for a CSV KB list.
.DESCRIPTION
Lists the software update compliance for a CSV KB list by ArticleID and Client State.
.NOTES
Created by Ioan Popovici
Part of a report should not be run separately.
.LINK
https://SCCM.Zone/SU-KB-Compliance-by-ArticleID
@Ioan-Popovici
Ioan-Popovici / Test-CMClientVersion.ps1
Last active April 1, 2019 16:31
Tests if the configuration manager client version is greater than the configuration manager deployed application version.
<#
.SYNOPSIS
Tests the configuration manager client version.
.DESCRIPTION
Tests if the configuration manager client version is greater than the configuration manager deployed application version.
Returns 'Compliant' if the condition is satisfied.
.PARAMETER ApplicationName
Specify the configuration manager application name to be used for detection.
.EXAMPLE
Powershell.exe -File Test-CMClientVersion.ps1 -ApplicationName 'SomeAplicationName'
@Ioan-Popovici
Ioan-Popovici / Install-CMClient.ps1
Last active April 3, 2024 13:31
Installs the configuration manager client using the script location as source.
<#
.SYNOPSIS
Installs the configuration manager client.
.DESCRIPTION
Installs the configuration manager client using the script location as source.
.EXAMPLE
Powershell.exe -File Install-CMClient.ps1 -ExecutionPolicy 'Bypass' -WindowStyle 'Hidden'
.INPUTS
None.
.OUTPUTS
@Ioan-Popovici
Ioan-Popovici / SIT Device by Boundary and Network.sql
Last active May 31, 2024 12:13
List devices by boundary group, boundary and network information.
/*
.SYNOPSIS
List devices by boundary and network information.
.DESCRIPTION
List devices by boundary group, boundary and network information.
.NOTES
Created by Ioan Popovici
Part of a report should not be run separately.
Requires
CM_Tools.dbo.ufn_IsIPInSubnet
SELECT SMS_Collection.*
FROM SMS_Collection
JOIN SMS_FullcollectionMembership ON SMS_FullCollectionMembership.CollectionID=SMS_Collection.CollectionID
WHERE SMS_FullCollectionMembership.ResourceID=##SUB:ResourceID##
@Ioan-Popovici
Ioan-Popovici / Copy-CMClientLogs.ps1
Created February 6, 2019 14:41
Copies the configuration manager client logs to a specified path.
<#
.SYNOPSIS
Copies the configuration manager client logs.
.DESCRIPTION
Copies the configuration manager client logs to a specified path.
.PARAMETER Path
Specifies the path to copy the log files to.
.EXAMPLE
Copy-CMClientLogs.ps1 -Share '\\SomePath'
.INPUTS
@Ioan-Popovici
Ioan-Popovici / Set-AMPPriority.ps1
Created February 6, 2019 14:16
Sets AMP priority to a specified value by increasing or decreasing the priority as required.
#region Function Set-AMPPriority
Function Set-AMPPriority {
<#
.SYNOPSIS
Sets AMP priority to a specified value.
.DESCRIPTION
Sets AMP priority to a specified value by increasing or decreasing the priority as required.
.PARAMETER Name
Specifies the AMP name.
.PARAMETER Priority
@Ioan-Popovici
Ioan-Popovici / ufn_IsIPInSubnet.sql
Last active October 25, 2019 11:45
Checks if the IP is in the specified subnet using the subnet mask. Returns 1 (True) or 0 (False).
/*
.SYNOPSIS
Checks if the IP is in the specified subnet.
.DESCRIPTION
Checks if the IP is in the specified subnet using the subnet mask.
Returns 1 (True) or 0 (False).
.PARAMETER IP
Specifies the IP to test.
.PARAMETER Subnet
Specifies the subnet IP.
@Ioan-Popovici
Ioan-Popovici / ufn_IsIPInRange.sql
Last active October 25, 2019 11:46
Checks if the IP is in the specified IP range and returns 1 or 0 (True/False).
/*
.SYNOPSIS
Checks if the IP is in the specified IP range.
.DESCRIPTION
Checks if the IP is in the specified IP range and returns 1 or 0 (True/False).
.PARAMETER IP
Specifies the IP.
.PARAMETER IPRange
Specifies the IP range.
.EXAMPLE
@Ioan-Popovici
Ioan-Popovici / ufn_CIDRFromIPMask.sql
Last active October 25, 2019 11:46
Gets the CIDR ('/') from a IP Subnet Mask.
/*
.SYNOPSIS
Gets the CIDR from a IP Subnet Mask.
.DESCRIPTION
Gets the CIDR ('/') from a IP Subnet Mask.
.PARAMETER IPSubnetMask
Specifies the IP subnet mask.
.EXAMPLE
SELECT dbo.ufn_CIDRFromIPMask('255.255.255.0')
.NOTES