You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just tryed to install and I get this error bellow and I couldnt find anything about it in the docs.
PowerShell 7.4.6
PS C:\Windows\System32> Protect-WindowsSecurity -GUI
17/01/2025 11:03:10: Could not find UserName or FullName of the current user with the SID S-X-X-XX-XXXXXXX-XXXXXX-XXXXXXX-XXXX
Protect-WindowsSecurity: Exception calling "Initialize" with "1" argument(s): "WMI query for 'MSFT_MpPreference' failed: Falha genérica "
The text was updated successfully, but these errors were encountered:
What kind of user account do you have? Local/Online (Microsoft account)/ EntraID/ Domain account.
Tell me more about your environment. Have you installed any 3rd party security solution?
Windows 11 with local domain that is in sync with EntraID. Yes we have 3rd party security solutions but I have configured exceptions to allow this script to run. There is no block in 3rd party security product.
In the same powershell window if I run "Get-WMIObject -class Win32_ComputerSystem | select -ExpandProperty username" I can get the Domain\username logged in windows.
Thanks, so the thing about user account is simply a logged message, it's not a terminating error and it doesn't cause issues, but i'll try to reproduce it on my end to fix it.
What you actually got an error for is when the module tries to query the Defender preferences using CIM instance which is almost the same as Get-MpPreference. I can't do anything about it because the module is just doing standard procedure. If you try it on a clean VM you will see it works, so you have to find the cause of the issue on your end.
With a high degree of certainty i can tell it's caused by the 3rd party security solution which is in the requirements of the module to not exist. (it is mentioned on the readme and FAQs section)
HotCakeX
changed the title
"WMI query for 'MSFT_MpPreference' failed: Generic Fail "
[Caused by 3rd party security solution] "WMI query for 'MSFT_MpPreference' failed: Generic Fail "
Jan 17, 2025
I've just tryed to install and I get this error bellow and I couldnt find anything about it in the docs.
PowerShell 7.4.6
PS C:\Windows\System32> Protect-WindowsSecurity -GUI
17/01/2025 11:03:10: Could not find UserName or FullName of the current user with the SID S-X-X-XX-XXXXXXX-XXXXXX-XXXXXXX-XXXX
Protect-WindowsSecurity: Exception calling "Initialize" with "1" argument(s): "WMI query for 'MSFT_MpPreference' failed: Falha genérica "
The text was updated successfully, but these errors were encountered: