Activate features if not enabled
This commit is contained in:
parent
e38ae40c8e
commit
854839edcf
2 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ $null = New-Module {
|
|||
Write-Host "Restoring TrackMania Nations Forever";
|
||||
|
||||
foreach ($feature in $features) {
|
||||
if (-not (Get-WindowsOptionalFeature -Online -FeatureName $feature).State) {
|
||||
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
|
||||
Write-Information "Enabling the ``$feature`` feature";
|
||||
Enable-WindowsOptionalFeature -Online -All -FeatureName $feature;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ $null = New-Module {
|
|||
Write-Host "Restoring TrackMania United Forever";
|
||||
|
||||
foreach ($feature in $features) {
|
||||
if (-not (Get-WindowsOptionalFeature -Online -FeatureName $feature).State) {
|
||||
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
|
||||
Write-Information "Enabling the ``$feature`` feature";
|
||||
Enable-WindowsOptionalFeature -Online -All -FeatureName $feature;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue