Skip to content

Commit

Permalink
This scripts blocks the exe compiled in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
harishsg993010 authored Jan 8, 2023
1 parent 911c43f commit e17730e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions block_debug_exe.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Import the AppLocker module
Import-Module AppLocker

# Create a new AppLocker rule to block execution of .exe files compiled in debug mode
New-AppLockerPolicyRule -FilePathRuleType Exe -FilePublisherCondition "*" -DebugInformationType Debug -Action Block

# Enable the AppLocker rules
Set-AppLockerPolicy -PolicyObject (Get-AppLockerPolicy -Effective) -Enabled $true

0 comments on commit e17730e

Please sign in to comment.