This article is to help people with windows 10 and 11 windows security not working.
On windows 11 do this
1) launch powershell as an admin
2) Set-ExecutionPolicy Unrestricted
3) Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
4) Set-ExecutionPolicy restricted
IGNORE THE ERRORS
on windows 10 do this
1) launch powershell as an admin}
2) run get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
3) if it doesn't work do this
4) run Add-AppxPackage -Register -DisableDevelopmentMode "C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\AppXManifest.xml"
5) run get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage