Fix to $iisPath

Get-WsusIISLocalizedNamespacePath was being called before it was declared.
This commit is contained in:
Austin
2021-11-03 16:17:00 -04:00
committed by GitHub
parent 6d0415e0d8
commit d3ffecf845

View File

@@ -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
@@ -94,8 +94,6 @@ $recommendedIISSettings = @{
ClientExecutionTimeout = 7200
}
$iisPath = Get-WsusIISLocalizedNamespacePath
<#
DeepClean
@@ -963,6 +961,7 @@ function Decline-SupersededUpdates ($verbose){
}
}
#-----------------------------------------------------------[Execution]------------------------------------------------------------
$iisPath = Get-WsusIISLocalizedNamespacePath
# Check commandline parameters.
switch($true) {