Skip to content

Commit

Permalink
🚸 Virtualization-based security: added another registry modification …
Browse files Browse the repository at this point in the history
…to ensure a higher rate of success
  • Loading branch information
pratyakshm committed Dec 10, 2023
1 parent 50d686e commit 580b643
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WinRice.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2554,6 +2554,7 @@ function DisableVBS {
print " This processor does not natively support MBEC. Emulating it will result in bigger impact on performance on MBEC-unsupported CPUs."
print " See https://docs.microsoft.com/en-us/windows/security/threat-protection/device-guard/enable-virtualization-based-protection-of-code-integrity."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "HyperVVirtualizationBasedSecurityOptOut" -Type DWord -Value 1
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Type DWord -Value 0
print "Disabled Virtualization-based security."
}

Expand All @@ -2564,6 +2565,7 @@ function EnableVBS {
space
print "Enabling Virtualization-based security..."
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "HyperVVirtualizationBasedSecurityOptOut"
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity"
print "Enabled Virtualization-based security."
}

Expand Down

0 comments on commit 580b643

Please sign in to comment.