Merge pull request #3747 from mixmatch/devel
fixed $source null check, reference to $Params
This commit is contained in:
commit
4fe583e29b
1 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ If ($state -eq "present") {
|
|||
$InstallParams.add("IncludeManagementTools",$includemanagementtools)
|
||||
}
|
||||
|
||||
if ($source -ne $null)
|
||||
if ($source)
|
||||
{
|
||||
$InstallParams.add("Source",$source)
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ If ($state -eq "present") {
|
|||
ElseIf (Get-Command "Add-WindowsFeature" -ErrorAction SilentlyContinue) {
|
||||
if ($IncludeManagementTools)
|
||||
{
|
||||
$Params.Remove("IncludeManagementTools")
|
||||
$InstallParams.Remove("IncludeManagementTools")
|
||||
}
|
||||
$featureresult = Add-WindowsFeature @InstallParams
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue