[GH-ISSUE #253] Win_Defender_Revert script does not reset Defender to defaults #8

Open
opened 2026-03-02 02:10:04 +03:00 by kerem · 2 comments
Owner

Originally created by @bbrendon on GitHub (Sep 5, 2024).
Original GitHub issue: https://github.com/amidaware/community-scripts/issues/253

github.com/amidaware/community-scripts@00fe75f0fe/scripts/Win_Defender_Revert.ps1 (L5)

The script appears to be taken from huntress which only reverts huntress settings.

Originally created by @bbrendon on GitHub (Sep 5, 2024). Original GitHub issue: https://github.com/amidaware/community-scripts/issues/253 https://github.com/amidaware/community-scripts/blob/00fe75f0fe81e40ac5a992708cecfca0e339ad24/scripts/Win_Defender_Revert.ps1#L5 The script appears to be taken from huntress which only reverts huntress settings.
Author
Owner

@silversword411 commented on GitHub (Sep 9, 2024):

I'm guessing you're trying to reset options/preferences back to what windows does OOBE?
Of course there's a bunch of HKCU sessions, and some that are HKLM settings....and you're probably not referring to just the Security panel?
https://www.thewindowsclub.com/reset-windows-security-app-in-windows-10
Get-AppxPackage *Microsoft.Windows.SecHealthUI* | Reset-AppxPackage

Based on some searches I don't think Microsoft has a Defender reset script, let me know if you find one though.

I'm thinking you'd have to query every setting from a virgin install home...and manually make them the same.
Then profile for pro.
Then OS detect, and rewrite each setting appropriately...
Then because notifications are custom HKCU reset all those values for notifications...

Whadda PITA.

<!-- gh-comment-id:2338807747 --> @silversword411 commented on GitHub (Sep 9, 2024): I'm guessing you're trying to reset options/preferences back to what windows does OOBE? Of course there's a bunch of HKCU sessions, and some that are HKLM settings....and you're probably not referring to just the Security panel? https://www.thewindowsclub.com/reset-windows-security-app-in-windows-10 `Get-AppxPackage *Microsoft.Windows.SecHealthUI* | Reset-AppxPackage` Based on some searches I don't think Microsoft has a Defender reset script, let me know if you find one though. I'm thinking you'd have to query every setting from a virgin install home...and manually make them the same. Then profile for pro. Then OS detect, and rewrite each setting appropriately... Then because notifications are custom HKCU reset all those values for notifications... Whadda PITA.
Author
Owner

@bbrendon commented on GitHub (Sep 9, 2024):

I'm not trying to do anything. I was looking at some huntress scripts and thought to my self... "this script seems familiar!!"
Searched here and one look at the script screamed "BS" :)

Off the top of my head, I think it would be very difficult to reset defender to factory defaults. I haven't tried or needed to yet.

<!-- gh-comment-id:2339256174 --> @bbrendon commented on GitHub (Sep 9, 2024): I'm not trying to do anything. I was looking at some huntress scripts and thought to my self... "this script seems familiar!!" Searched here and one look at the script screamed "BS" :) Off the top of my head, I think it would be very difficult to reset defender to factory defaults. I haven't tried or needed to yet.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/community-scripts#8
No description provided.