diff --git a/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 index e073f71f..8d3ab0ca 100644 --- a/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 +++ b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 @@ -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; } diff --git a/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 index d4496ad1..d51047e8 100644 --- a/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 +++ b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 @@ -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; }