Aug 06 2021 11:41 AM
I cannot open any of the settings on windows defender, when i try to it tells me to look for a compatible app in the Microsoft Store. Is this a bug or some other (fixable) issue?
Mar 29 2022 10:17 AM
Ive tried that but Im getting an error message. are there any other options to fix this?
PS C:\WINDOWS\system32> Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
>>
Get-AppxPackage : Access is denied.
Access is denied.
At line:1 char:1
+ Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AppxPackage], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Windows.Appx.PackageManager.Commands.GetApp
xPackageCommand
Mar 29 2022 10:29 AM
Mar 29 2022 06:56 PM
Mar 29 2022 08:05 PM
@wincenty make sure you are running powershell as admin
Mar 29 2022 10:18 PM
Mar 30 2022 12:43 AM
I did run it as an admin on powershell (I pasted the command and the message I was getting in my comment above). The message I got is that the access is restricted. So this didn't solve the issue.
Id be grateful if you had any other ideas how to fix this...
Mar 30 2022 02:18 AM
Mar 30 2022 11:44 PM
@DLDADRIZZLE It worked for me too! thankyou very much :)
Apr 01 2022 11:58 AM
Just got a new Laptop, had this issue.
using "Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage" fixed it.
note, you need to use elevated (run as admin) "powershell" not elevated "command prompt" for the string to work.
Apr 02 2022 02:31 PM
Thank you everyone who has posted the powershell prompt fix. I can't believe I keep having to go to online forums to fix issues with windows every few months. I'm seriously considering switching to mac for my next computer because I'm so sick of dealing with the constant issues that we have to figure out ourselves
Apr 05 2022 12:34 AM
Apr 05 2022 12:49 AM
Apr 05 2022 04:26 PM
@wincentyI haven't solved this problem, too. I tried a new clean local user account too, but still Windows defender doesn't work...
Apr 06 2022 02:07 AM - edited Apr 06 2022 03:25 PM
This was the only one that worked for for my Windows 21H2 (OS Build 22000.593). The key was running the command as the logged on user and not as administrator.
I doubt I can say thank you enough. I read through all posts running each new command suggested to no avail - but I had hope it would eventually be solved.
Thank you again.
UPDATE: For those that go right to the end of a long post, here's a recap of Rebecca Harshbarger's post.
Note: This is for those that do not run their computers with an account with admin privileges. In other words, if you need to enter both a username and a password when prompted for credentials if running commands as administrator, then this is for you.
First: run the command below via an elevated PowerShell:
PS C:\WINDOWS\system32> Set-ExecutionPolicy Unrestricted
PS C:\WINDOWS\system32> Get-AppxPackage Microsoft.SecHealthUI -AllUsers
Name : Microsoft.SecHealthUI
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 1000.22581.1.0
PackageFullName : Microsoft.SecHealthUI_1000.22581.1.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.SecHealthUI_1000.22581.1.0_x64__8wekyb3d8bbwe
IsFramework : False
PackageFamilyName : Microsoft.SecHealthUI_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-3853775740-655389605-3070002155-1005 [admin]: Installed}
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : True
Dependencies : {Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe, Microsoft.UI.Xaml.2.4_2.42007.9001.0_x64__8wekyb3d8bbwe}
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
NOTE: If the PackageUserInformation doesn't list your username, then you'll need to continue to the next step below. If your account is listed and you are stil unable to launch the Windows Security dialog, then you'll have to wait for another solution.
Copy the InstallLocation of the SecHealthUI executable - for me this is:
...
C:\Program Files\WindowsApps\Microsoft.SecHealthUI_1000.22581.1.0_x64__8wekyb3d8bbwe
...
Next: Launch another PowerShell window WITHOUT electing to run as administrator, then execute the following commands:
add-appxpackage -disabledevelopmentmode -register ('C:\Program Files\WindowsApps\Microsoft.SecHealthUI_1000.22581.1.0_x64__8wekyb3d8bbwe\AppxManifest.xml')
Now back to the elevated PowerShell, run the following command:
Get-AppxPackage Microsoft.SecHealthUI -AllUsers
NOTE: Make sure that PackageUserInformation now lists your user account.
You should now be able to launch the Windows defender UI without that very annoying message.
Apr 06 2022 11:24 PM
I'm having the exact same issue, on two separate laptops, one running Windows 10 and the other with Windows 11, and yes, I too did full reinstallations on both machines. I am able to access the firewall / defender by going to the old school "Control Panel" but it's a nuisance to have to do this frequently. I'm having this issue with other areas under "Settings" as well. Very frustrating. @Asuka_Okami
Apr 08 2022 06:07 AM
It works. Thank you so much! @Francis_Powell