Additional Script Updates
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Detection Script: Detect_DeviceGuard.ps1
|
||||
|
||||
# Check if Device Guard is enabled
|
||||
$deviceGuardStatus = Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard
|
||||
|
||||
if ($deviceGuardStatus.SecurityServicesConfigured -contains 2 -and $deviceGuardStatus.SecurityServicesRunning -contains 2) {
|
||||
Write-Output "Device Guard is enabled."
|
||||
exit 0
|
||||
} else {
|
||||
Write-Output "Device Guard is not enabled."
|
||||
exit 1
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
# Remediation Script: Remediate_DeviceGuard.ps1
|
||||
|
||||
# Enable Device Guard
|
||||
$regKey = "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard"
|
||||
Set-ItemProperty -Path $regKey -Name "EnableVirtualizationBasedSecurity" -Value 1
|
||||
Set-ItemProperty -Path $regKey -Name "RequirePlatformSecurityFeatures" -Value 1
|
||||
|
||||
Write-Output "Device Guard has been enabled."
|
||||
Reference in New Issue
Block a user