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 know that it takes time to give context for bug reports, but it's very useful, you'll see why, so thank you for your efforts @ElektroStudios .
On a Windows 10 (19045.4894) system, I initially couldn't reproduce the errors when running the scripts individually. However, when I executed the complete script file you provided, I was able to reproduce the issue.
After investigating further, I identified that the errors are caused by two specific scripts in privacy.sexy 0.13.7 that disable Windows Defender components more comprehensively. Specifically, Disable Defender Antivirus service communication with apps and Disable Defender Antivirus WMI management are disabling the WMI provider that Set-MpPreference depends on, causing subsequent commands to fail.
To verify this, I tested on a clean machine with these two scripts removed, and all remaining scripts executed successfully. This confirms these specific scripts as the source of the issue. The good news is that these Set-MpPreference errors can be safely ignored since the desired settings are still being applied through alternative methods like group policies, so the functionality isn't impaired despite the error messages.
Scripts that causes the issue:
Disable Defender Antivirus service communication with apps
Disable Defender Antivirus WMI management
To resolve this, I plan to:
Improve the error message clarity for these specific failures and convert the error indicators from red to yellow warnings.
Implement registry modification fallbacks for all Set-MpPreference operations. This will require using Procmon or similar tools to identify the exact registry changes, which will take some additional development time.
Add a "(breaks Set-MpPreference) warning to title of these scripts.
Description
The following scripts with descriptions:
Are causing the same following error message:
FullyQualifiedErrorId:
Microsoft.PowerShell.Commands.WriteErrorException
Partial output (in Spanish):
sexy_Set-MpPreference.txt
Note: Repeated output message "La operación se completó correctamente." it means: "The operation was completed successfully."
How can the bug be recreated?
No exact idea. ¿Maybe having the same Windows 10 OS build I have, and running the Privacy Sexy generated script file that I've attached?.
Operating system
Windows 10
Script file
PrivacySexy.zip
Screenshots
Additional information
Tested with Privacy Sexy version 0.13.7
PowerShell
$PSVersionTable
output:The text was updated successfully, but these errors were encountered: