change ErrorAction to SilentlyContinue

This commit is contained in:
mcreekmore
2025-01-22 21:40:23 -05:00
parent e05cabf5e4
commit f8137dde02

View File

@ -58,7 +58,7 @@ function Invoke-WinUtilUninstallPSProfile {
Where-Object { $_.Name -match $FontFamilyName } |
ForEach-Object {
If ($_.Name -like "*$FontFamilyName*") {
Remove-ItemProperty -path $FontsRegPath -Name $_.Name -ErrorAction Stop
Remove-ItemProperty -path $FontsRegPath -Name $_.Name -ErrorAction SilentlyContinue
}
}
} catch {