Forum Discussion
Issue with Windows Defender on Windows 11
- Aug 07, 2021I had this problem on all machines updated from 19043.1151 to 22000.120.
This command from elevated PowerShell fixed the problem for me, try it and report the results:
Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
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.