Skip to content

Commit

Permalink
this scripts blocks unsigned exe from execution
Browse files Browse the repository at this point in the history
  • Loading branch information
harishsg993010 authored Jan 8, 2023
1 parent e17730e commit 1a4c3fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions block_unsigned_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 that are not digitally signed
New-AppLockerPolicyRule -FilePathRuleType Exe -FilePublisherCondition "*" -SignerType "NotSigned" -Action Block

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

0 comments on commit 1a4c3fb

Please sign in to comment.