Skip to content

Commit 108694c

Browse files
authored
Version 2.5.1
1 parent 4822701 commit 108694c

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

Invoke-DGASoftwareUpdateMaintenance/Invoke-DGASoftwareUpdateMaintenance.ps1

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ Version 2.4.9 09/17/20
134134
Update O365 plugin with new channel names [Damien Solodow]
135135
Add several plugins [Chad Simmons, Damien Solodow]
136136
Fix the lookup for ConfigMgr supersedence settings.
137+
Version 2.5.0 09/17/20
138+
Fixed the fix for looking up ConfigMgr supersedence settings.
139+
Version 2.5.1 09/19/20
140+
Fixed the fix for the fix for looking up ConfigMgr supersedence settings.
137141
138142
.LINK
139143
http://www.damgoodadmin.com
@@ -923,7 +927,7 @@ Param(
923927
#endregion
924928

925929
$cmSiteVersion = [version]"5.00.8540.1000"
926-
$scriptVersion = "2.4.9"
930+
$scriptVersion = "2.5.1"
927931
$component = 'Invoke-DGASoftwareUpdateMaintenance'
928932
$scriptPath = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
929933
Write-Verbose -Message "Script Path: $scriptPath"
@@ -1588,21 +1592,29 @@ If ($DeleteDeclined -or $DeclineSuperseded -or $DeclineByTitle -or $DeclineByPlu
15881592
$supersedenceMode = (((Get-CMSoftwareUpdatePointComponent -SiteCode $SiteCode).Props) | Where-Object {$_.PropertyName -eq 'Sync Supersedence Mode For NonFeature'}).Value
15891593

15901594
#Verify that the product team didn't change these on us again.
1591-
if (!$supersedenceMode)
1595+
if ($null -eq $supersedenceMode)
15921596
{
1593-
Add-TextToCMLog $LogFile "Failed to determine ConfigMgr's supersedence mode. Exiting without making any changes." $component 3
1594-
return
1597+
$supersedenceMode = (((Get-CMSoftwareUpdatePointComponent -SiteCode $SiteCode).Props) | Where-Object {$_.PropertyName -eq 'Sync Supersedence Mode'}).Value
1598+
if ($null -eq $supersedenceMode)
1599+
{
1600+
Add-TextToCMLog $LogFile "Failed to determine ConfigMgr's supersedence mode. Exiting without making any changes." $component 3
1601+
return
1602+
}
15951603
}
15961604

15971605
If ($supersedenceMode -eq 0){
15981606
$ExclusionPeriod = 0
15991607
} Else {
16001608
$supersedenceAge = (((Get-CMSoftwareUpdatePointComponent -SiteCode $SiteCode).Props) | Where-Object {$_.PropertyName -eq 'Sync Supersedence Age For NonFeature'}).Value
16011609
#Verify that the product team didn't change these on us again.
1602-
if (!$supersedenceAge)
1610+
if ($null -eq $supersedenceAge)
16031611
{
1604-
Add-TextToCMLog $LogFile "Failed to determine ConfigMgr's supersedence age. Exiting without making any changes." $component 3
1605-
return
1612+
$supersedenceAge = (((Get-CMSoftwareUpdatePointComponent -SiteCode $SiteCode).Props) | Where-Object {$_.PropertyName -eq 'Sync Supersedence Age'}).Value
1613+
if ($null -eq $supersedenceAge)
1614+
{
1615+
Add-TextToCMLog $LogFile "Failed to determine ConfigMgr's supersedence age. Exiting without making any changes." $component 3
1616+
return
1617+
}
16061618
}
16071619

16081620
$ExclusionPeriod = $supersedenceAge

0 commit comments

Comments
 (0)