Set-WindowsSpeculativeMitigation

1.0.0

This script sets the Windows registry values FeatureSettingsOverrideMask and
FeatureSettingsOverride under:
   HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
to mitigate speculative execution vulnerabilities including Spectre, Meltdown,
L1TF, MDS, TAA, and Intel Branch History Injection (BHI / CVE-2022-0001).

Three mitigation levels are ava
This script sets the Windows registry values FeatureSettingsOverrideMask and
FeatureSettingsOverride under:
   HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
to mitigate speculative execution vulnerabilities including Spectre, Meltdown,
L1TF, MDS, TAA, and Intel Branch History Injection (BHI / CVE-2022-0001).

Three mitigation levels are available:
 Level 1 - All speculative execution CVEs including CVE-2022-0001 with Hyper-Threading enabled (Recommended)
 Level 2 - All speculative execution CVEs including CVE-2022-0001 with Hyper-Threading disabled
 Level 3 - CVE-2022-0001 (Intel BHI) only - use only if other speculative execution mitigations are managed separately

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Set-WindowsSpeculativeMitigation

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 PowerShell Scripts Collection

Package Details

Author(s)

  • PowerShell Scripts Collection

Tags

@('SpeculativeExecution' 'Spectre' 'Meltdown' 'BHI' 'Security' 'Windows')

Functions

Test-Administrator Get-CurrentRegistryValue Set-RegistryDword Test-HyperThreadingEnabled Main

Dependencies

This script has no dependencies.

Release Notes

Initial release with CVE-2022-0001 BHI mitigation and Hyper-Threading validation.

FileList

Version History

Version Downloads Last updated
1.0.0 (current version) 4 8/10/2026