Recall Optional Feature Check

This commit is contained in:
zoicware
2025-06-24 21:57:25 -04:00
committed by GitHub
parent b580cbd11b
commit 1e3ee8f452

View File

@@ -356,15 +356,18 @@ foreach ($path in $eolKeys) {
} }
#remove recall optional feature #remove recall optional feature
$ProgressPreference = 'SilentlyContinue' Write-Status -msg 'Removing Recall Optional Feature...'
try { $state = (Get-WindowsOptionalFeature -Online -FeatureName 'Recall').State
Write-Status -msg 'Removing Recall Optional Feature...' if ($state -and $state -ne 'DisabledWithPayloadRemoved') {
Disable-WindowsOptionalFeature -Online -FeatureName 'Recall' -Remove -NoRestart -ErrorAction Stop *>$null $ProgressPreference = 'SilentlyContinue'
try {
Disable-WindowsOptionalFeature -Online -FeatureName 'Recall' -Remove -NoRestart -ErrorAction Stop *>$null
}
catch {
#hide error
}
} }
catch {
#hide error
}
Write-Status -msg 'Removing Appx Package Files...' Write-Status -msg 'Removing Appx Package Files...'
#-----------------------------------------------------------------------remove files #-----------------------------------------------------------------------remove files