Skip to content

Commit 099bb69

Browse files
authored
Merge pull request #41 from ChadSimmons/master
Updated documentation for clarity
2 parents b6069a9 + ab40f0c commit 099bb69

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

Invoke-DGASoftwareUpdateMaintenance/Plugins/Disabled/Decline-WindowsX86.ps1

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,40 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
2424
# This script is invoked by Invoke-DGASoftwareUpdateMaintenance.ps1 and not run independently
2525
#
2626
# ========== Keywords ==========
27-
# Keywords: WSUS SUP SCCM ConfigMgr Decline Expire Update Maintenance Superseded
27+
# Keywords: WSUS SUP SCCM MECM MEMCM ConfigMgr Decline Expire Update Maintenance Superseded
2828
# ========== Change Log History ==========
29+
# - 2022/08/24 by [email protected] - Updated documentation for clarity
2930
# - 2018/07/27 by [email protected] - Changed Decline Reason to include matching ProductTitle
3031
# - 2018/07/11 by [email protected] - Added functionality for supported 32-bit operating systems so unsupported ones are declined
3132
# - 2018/04/30 by [email protected] - Created
3233
# - 2018/04/30 by [email protected] - Created
33-
# === To Do / Proposed Changes ===
34-
# - TODO: None
3534
################################################################################
3635

36+
#Add a Product to KEEP related x86 Updates. All Updates NOT associated with one of these Products will be declined
3737
$SupportedWinX86Versions = @('Windows Server 2003, Datacenter Edition', 'Windows Server 2003', 'Windows Server 2008', 'Windows XP', 'Windows 7')
38-
#KnownWinX86Versions = @('Windows Server 2003, Datacenter Edition','Windows Server 2003','Windows Server 2008','Windows XP','Windows 7','Windows 8','Windows 8.1','Windows 10')
38+
<#Known Windows 32-bit Products / ProductTitles
39+
Windows Server 2003
40+
Datacenter Edition
41+
Windows Server 2003
42+
Windows Server 2008
43+
Windows XP
44+
Windows 7
45+
Windows 8
46+
Windows 8.1
47+
Windows 10
48+
#>
3949

4050
Function Invoke-SelectUpdatesPlugin {
41-
[CmdletBinding()]
4251
$DeclineUpdates = @{}
43-
$WindowsX86Updates = ($ActiveUpdates | Where {($_.LegacyName -notlike '*DOTNET*-X86-TSL') -and ($_.LegacyName -like 'WSUS*_x86' -or $_.LegacyName -like '*WINDOWS*-KB*-X86-*' -or $_.LegacyName -like 'KB*-*-X86-TSL')})
44-
#WINDOWS7CLIENT-KB982799-X86-308159-23798
45-
#WINDOWS7EMBEDDED-KB2124261-X86-325274-25932
46-
#KB4099989-Windows10Rs3Client-RTM-ServicingStackUpdate-X86-TSL-World
47-
#KB947821-Win7-SP1-X86-TSL
48-
#WINDOWS6-1-KB975891-X86-294176
49-
Add-TextToCMLog $LogFile " Supported Windows X86 Products: $($SupportedWinX86Versions -join '; ')." $component 1
52+
$WindowsX86Updates = ($ActiveUpdates | Where-Object {($_.LegacyName -notlike '*DOTNET*-X86-TSL') -and ($_.LegacyName -like 'WSUS*_x86' -or $_.LegacyName -like '*WINDOWS*-KB*-X86-*' -or $_.LegacyName -like 'KB*-*-X86-TSL')})
53+
#Example: WINDOWS7CLIENT-KB982799-X86-308159-23798
54+
#Example: WINDOWS7EMBEDDED-KB2124261-X86-325274-25932
55+
#Example: KB4099989-Windows10Rs3Client-RTM-ServicingStackUpdate-X86-TSL-World
56+
#Example: KB947821-Win7-SP1-X86-TSL
57+
#Example: WINDOWS6-1-KB975891-X86-294176
58+
Add-TextToCMLog $LogFile " Supported Windows X86 Products: $($SupportedWinX86Versions -join '; '). All others will be declined." $component 1
5059

51-
#Loop through the updates and decline any that match the version.
60+
#Loop through the updates and decline any that are not in the Supported products list
5261
ForEach ($update in $WindowsX86Updates) {
5362
If (($update.ProductTitles | Select-String -pattern $SupportedWinX86Versions -SimpleMatch -List).Count -eq 0) {
5463
$DeclineUpdates.Set_Item($Update.Id.UpdateId, "Unsupported OS: $($update.ProductTitles) (32-bit)")

0 commit comments

Comments
 (0)