Enure features for PinnedItem are installed
This commit is contained in:
parent
aadc6413ad
commit
ffcda8584d
|
@ -12,4 +12,20 @@ foreach ($key in $PSBoundParameters.Keys) {
|
||||||
$parameters.Add($key, $PSBoundParameters.TryGetValue($key));
|
$parameters.Add($key, $PSBoundParameters.TryGetValue($key));
|
||||||
}
|
}
|
||||||
|
|
||||||
Start-SoftwareInstaller @parameters;
|
$arguments = $parameters.arguments;
|
||||||
|
$arguments.Add("Installer", $parameters.installer);
|
||||||
|
|
||||||
|
Start-SoftwareInstaller @parameters -Installer {
|
||||||
|
param(
|
||||||
|
[hashtable] $Arguments
|
||||||
|
)
|
||||||
|
|
||||||
|
$feature = "NetFx3";
|
||||||
|
|
||||||
|
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
|
||||||
|
Write-Host "Enabling ``$feature`` feature…";
|
||||||
|
choco install --source windowsFeatures -y $feature;
|
||||||
|
}
|
||||||
|
|
||||||
|
& $Arguments.Installer;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue