Skip to content

Commit

Permalink
Fix to $iisPath
Browse files Browse the repository at this point in the history
Get-WsusIISLocalizedNamespacePath was being called before it was declared.
  • Loading branch information
awarre authored Nov 3, 2021
1 parent 6d0415e commit d3ffecf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Optimize-WsusServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Declines all updates that have been approved and are superseded by other updates
Creates a scheduled task to run the OptimizeDatabase function weekly.
.NOTES
Version: 1.2.0
Version: 1.2.1
Author: Austin Warren
Creation Date: 2020/07/31
Expand Down Expand Up @@ -94,8 +94,6 @@ $recommendedIISSettings = @{
ClientExecutionTimeout = 7200
}

$iisPath = Get-WsusIISLocalizedNamespacePath

<#
DeepClean
Expand Down Expand Up @@ -963,6 +961,7 @@ function Decline-SupersededUpdates ($verbose){
}
}
#-----------------------------------------------------------[Execution]------------------------------------------------------------
$iisPath = Get-WsusIISLocalizedNamespacePath

# Check commandline parameters.
switch($true) {
Expand Down

0 comments on commit d3ffecf

Please sign in to comment.