Forum Discussion
Issue with Windows Defender on Windows 11
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?
- I 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
446 Replies
- Uwe_SchnellerCopper Contributor
Neither "system file checker..." nor "Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage" worked on my computer. But the following command in an elevated PowerShell solved the problem: Add-AppxPackage -Register -DisableDevelopmentMode "C:\Program Files\WindowsApps\Microsoft.SecHealthUI_1000.22000.1.0_neutral__8wekyb3d8bbwe\AppXManifest.xml"
- fawadtariqCopper Contributorthis worked for me put it in a elevated powershell Add-AppxPackage -Register -DisableDevelopmentMode "C:\Program Files\WindowsApps\Microsoft.SecHealthUI_1000.22000.1.0_neutral__8wekyb3d8bbwe\AppXManifest.xml"
- smnlvrCopper ContributorThanks, this worked for me: Add-AppxPackage -Register -DisableDevelopmentMode "C:\Program Files\WindowsApps\Microsoft.SecHealthUI_1000.22000.1.0_neutral__8wekyb3d8bbwe\AppXManifest.xml", followed by Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
- Emmalee1195Copper Contributor
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
- Rebecca_HarshbargerCopper ContributorI had the same problem. I could open Windows Security as my admin user, but not as my unprivileged user. Nothing on this thread fixed it. Here's what worked:
Step 1. While logged into Windows as my regular user, I started PowerShell 7 (x64) in Administrator code and ran these two commands:
Set-ExecutionPolicy Unrestricted
Get-AppxPackage Microsoft.SecHealthUI -AllUsers
The second command showed a bunch of information, including the InstallLocation.
Step 2. I started PowerShell 7 (x64) in regular mode, so that it ran as my regular user. I entered a command like this, where InstallLocation was the value from Step 1, above:
add-appxpackage -disabledevelopmentmode -register ('InstallLocation\AppxManifest.xml')
This was the exact text of my command; yours may vary:
add-appxpackage -disabledevelopmentmode -register ('C:\Program Files\WindowsApps\Microsoft.SecHealthUI_1000.22000.1.0_neutral__8wekyb3d8bbwe\AppxManifest.xml')
That fixed the problem. By the way, once it was fixed, the command "Get-AppxPackage Microsoft.SecHealthUI -AllUsers" showed both my usernames in its PackageUserInformation value.- mixed_reviewsCopper ContributorThis still works in Jan 2024! Thank you so much!
- Alright580Copper Contributor
I tried those commands in powershell and it said my access was denied and tried the Get App command and it said Get App not a recognized as this
Get-AppxPackage : Access is denied.
Access is denied.
At line:1 char:1
+ Get-AppxPackage Microsoft.SecHealthUI -AllUsers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AppxPackage], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Windows.Appx.PackageManager.Commands.GetApp
xPackageCommand - MoBowen1225Copper Contributor
My microsoft Windows defender is not working I have tried multiple suggestions using powershell commands to get it working again but NONE of them work for me
Please help me
- dhruvbehraniCopper Contributor
Asuka_Okami https://www.youtube.com/watch?v=FMumFFcdtec this is a really simple fix for it
- PolashworkCopper Contributor
Windows security is no open on my windows 11
- ZoltanSandalCopper Contributor
I did the same on the video but for me its not workink.dhruvbehrani
- Erik_CCopper ContributorThis worked perfectly the instant I closed Powershell. The text for the command is in the video's description.
- Reza_AmeriSilver ContributorAnyone who is facing this issue, make sure report it using the Feedback Hub app and also upvote the existing ones. Also try update the Windows.
- stamacCopper Contributor
Simply awesome!!! Excellent!!!
- brahmareddyCopper ContributorReinstall using PowerShell Command
The problem is not new and has been reported by Windows 10 users as well when they upgraded from a feature update. The solution is relatively simple.
Open Windows Terminal and ensure it opens in PowerShell mode. Next, run the following commands
Set-ExecutionPolicy Unrestricted
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} - Little_JoeBronze ContributorJust try with this one it should works for most of cases: Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
- luizfernandorg1Copper Contributor
Asuka_Okami So I had the same problem since I upgrade from Windows 10 to 11, the problem is I have two users one is a normal user and another one as an Administrative user account, through the Administrative account I was able to access Windows Security, and then open the Windows Defender, what didn’t happen using the normal user, in the normal user it asks to install an App to open “windowsdefender”. so my conclusion is that Windows 11 limited Windows Security to be open only by Administrators’ accounts, but on Windows 10 I had the same users, and both I was able to open Windows Defender and make scans, now, through normal user account I only was able to open PowerShell as Administrator and execute scans using Windows Defender through the command line.
- Little_JoeBronze Contributor
You could try with the following cmdlets and make sure you run PS with admin rights.
Get-AppxPackage -allusers *SecHealthUI* | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}
- Jabber00Copper ContributorThis is the message I receive with admin rights:
Get-AppxPackage : Accesso negato.
Accesso negato.
In riga:1 car:1
+ Get-AppxPackage -allusers *SecHealthUI* | Foreach {Add-AppxPackage -D ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AppxPackage], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Windows.Appx.PackageManager.Commands.GetApp
xPackageCommand
I already tried similar cmdlets (the one in the previous message), but nothing solved the problem- Little_JoeBronze ContributorWhat about you try to re-enter the following one with admin rights:
Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage