SaferComputing.com

Guide 4 · Windows

Windows 11 Pro privacy and telemetry hardening

Verifiable Windows 11 Pro hardening with built-in tools: diagnostic data limits, Recall, attack surface reduction rules, credential protection, BitLocker, SMB and PowerShell logging, with the commands to check each one.

Published
Updated
Applies to
Windows 11 Pro, versions 25H2 and 26H2

Start with the version

Hardening a version that no longer gets security updates is wasted effort. Windows 11 version 24H2 Home and Pro received their last update in October 2026; 25H2 is supported until 12 October 2027 and 26H2 until 10 October 2028.

Windows PowerShell
(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').DisplayVersion
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5 HotFixID, InstalledOn

Run every command in this guide in PowerShell opened with Run as administrator unless the label says otherwise.

Privacy settings in the Settings app

Open Settings, then Privacy & security:

  • General: turn off the advertising ID and the other options on this page you do not want.
  • Diagnostics & feedback: turn off Send optional diagnostic data and Tailored experiences, and use Delete diagnostic data to remove what has already been collected.
  • Activity history and Search permissions: turn off what you do not use.

Note Trade-off with Smart App Control

Microsoft's Smart App Control questions page lists optional diagnostic data not being sent as one reason Smart App Control ends up turned off. If you rely on Smart App Control, check its status in Windows Security, App & browser control after changing diagnostic settings.

Diagnostic data by policy

On Windows 11 Pro, the lowest diagnostic data level that takes effect is Send required diagnostic data. The Diagnostic data off setting only applies to Windows Enterprise, Education and Server; on Pro, choosing it has the same effect as required.

In Group Policy (gpedit.msc): Computer Configuration, Administrative Templates, Windows Components, Data Collection and Preview Builds, Allow diagnostic data, set to Enabled with Send required diagnostic data. The same setting from PowerShell:

Windows PowerShell, as Administrator
if (-not (Test-Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection')) { New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' -Force | Out-Null }
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' -Name AllowTelemetry -Type DWord -Value 1
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' -Name AllowTelemetry

Recall

Recall takes snapshots of the screen so you can search your history. It exists only on Copilot+ PCs, it is opt-in, and Microsoft disables and removes it by default on managed devices.

  • Group Policy, under Windows Components, Windows AI: Allow Recall to be enabled set to Disabled removes Recall after a restart. Turn off saving snapshots for use with Recall stops snapshots; set it explicitly rather than relying on its default. Both apply to Pro on version 24H2 with update KB5055627 (build 26100.3915) or later.
  • Check and remove the feature:
Windows PowerShell, as Administrator
Get-WindowsOptionalFeature -Online -FeatureName 'Recall'
Disable-WindowsOptionalFeature -Online -FeatureName 'Recall' -Remove

Attack surface reduction rules

Attack surface reduction rules block specific behaviours that malware relies on, such as Office macros starting programs or tools reading passwords from memory.

Requirements

  • They work on Windows 11 Pro through Group Policy or PowerShell.
  • Microsoft Defender Antivirus must be the active antivirus with real-time protection on, not in passive mode. If another security product is your primary antivirus, Defender runs in passive mode and these rules do not apply.
  • Cloud-delivered protection should be on, and Defender should be no more than two versions behind.
  • Without a Defender for Endpoint licence there is no central reporting, but each computer still logs events locally.
Windows PowerShell, as Administrator
Get-MpComputerStatus | Select-Object AMRunningMode, AntivirusEnabled, RealTimeProtectionEnabled, AMProductVersion

AMRunningMode should read Normal.

Turn on the standard protection rules

Microsoft recommends three rules that can go straight to block mode without lengthy testing:

Windows PowerShell, as Administrator
Add-MpPreference -AttackSurfaceReductionRules_Ids 56a863a9-875e-4185-98a7-b882c64b5ce5, 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2, e6db77e5-3df2-4cf1-b95a-636979351e5b -AttackSurfaceReductionRules_Actions Enabled, Enabled, Enabled

Warning Use Add-MpPreference, not Set-MpPreference

Set-MpPreference replaces the whole rule list with the one you give it, wiping rules that were already set. Add-MpPreference adds to it. Two exceptions to the standard rules: if Configuration Manager manages the computer, test the WMI persistence rule in audit mode first, because the Configuration Manager client relies heavily on WMI; and the credential-stealing rule is redundant once LSA protection is on.

Audit the rest before blocking

Put the other rules in audit mode, watch the event log for a week or two, then switch the quiet ones to block. Audit mode logs what a rule would have blocked without blocking it.

Windows PowerShell, as Administrator
Add-MpPreference -AttackSurfaceReductionRules_Ids d4f940ab-401b-4efc-aadc-ad5f3c50688a -AttackSurfaceReductionRules_Actions AuditMode
Get-WinEvent -LogName 'Microsoft-Windows-Windows Defender/Operational' -FilterXPath '*[System[(EventID=1121 or EventID=1122)]]' -MaxEvents 50 |
  Format-List TimeCreated, Id, Message

Event 1121 is a block and event 1122 is an audit. To see what is set now:

Windows PowerShell
$p = Get-MpPreference
for ($i = 0; $i -lt @($p.AttackSurfaceReductionRules_Ids).Count; $i++) {
  '{0}  {1}' -f $p.AttackSurfaceReductionRules_Ids[$i], $p.AttackSurfaceReductionRules_Actions[$i]
}

The action numbers are 0 for off, 1 for block, 2 for audit and 6 for warn. Warn mode lets the user unblock for 24 hours, and since Defender platform version 4.18.26060 the unblock needs an administrator's approval; it is not available for the credential-stealing rule or the Office code-injection rule.

All 19 rules

RuleGUID
Block abuse of exploited vulnerable signed drivers (standard protection)56a863a9-875e-4185-98a7-b882c64b5ce5
Block credential stealing from the Windows local security authority subsystem (standard protection)9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2
Block persistence through WMI event subscription (standard protection)e6db77e5-3df2-4cf1-b95a-636979351e5b
Block Adobe Reader from creating child processes7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c
Block all Office applications from creating child processesd4f940ab-401b-4efc-aadc-ad5f3c50688a
Block executable content from email client and webmailbe9ba2d9-53ea-4cdc-84e5-9b1eeee46550
Block executable files from running unless they meet a prevalence, age, or trusted list criterion01443614-cd74-433a-b99e-2ecdc07bfc25
Block execution of potentially obfuscated scripts5beb7efe-fd9a-4556-801d-275e5ffc04cc
Block JavaScript or VBScript from launching downloaded executable contentd3e037e1-3eb8-44c8-a917-57927947596d
Block Office applications from creating executable content3b576869-a4ec-4529-8536-b80a7769e899
Block Office applications from injecting code into other processes75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84
Block Office communication application from creating child processes26190899-1602-49e8-8b27-eb1d0a1ce869
Block process creations originating from PSExec and WMI commandsd1e49aac-8f56-4280-b9ba-993a6d77406c
Block rebooting machine in Safe Mode33ddedf1-c6e0-47cb-833e-de6133960387
Block untrusted and unsigned processes that run from USBb2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4
Block use of copied or impersonated system toolsc0033c00-d16d-4114-a5a0-dc9b3a7d2ceb
Block Webshell creation for Serversa8f5898e-1dc8-49a9-9878-85004b8a61e6
Block Win32 API calls from Office macros92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b
Use advanced protection against ransomwarec1db55ab-c21a-4637-bb3f-a12568109d35

Credential protection

LSA protection

LSA protection runs the process that holds sign-in secrets as a protected process, so other programs cannot read its memory. Windows only turns it on by default for new installs of 22H2 or later that are joined to Active Directory or Microsoft Entra and can run memory integrity. A standalone Pro computer gets audit mode only, so turn it on yourself: Windows Security, Device security, Core isolation details, Local Security Authority protection, then restart.

Windows PowerShell, as Administrator
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa' -Name RunAsPPL -ErrorAction SilentlyContinue
Get-WinEvent -FilterHashtable @{ LogName = 'System'; ProviderName = 'Microsoft-Windows-Wininit'; Id = 12 } -MaxEvents 1 |
  Format-List TimeCreated, Message

RunAsPPL of 1 or 2 means it is configured. After a restart, event 12 should say the process "was started as a protected process with level: 4".

Memory integrity

Memory integrity is on the same Core isolation page. Check that it is running:

Windows PowerShell
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard |
  Select-Object VirtualizationBasedSecurityStatus, SecurityServicesRunning

VirtualizationBasedSecurityStatus of 2 means virtualization-based security is running; SecurityServicesRunning containing 2 means memory integrity is running.

Credential Guard is not licensed for Windows 11 Pro, except on Pro devices that already ran it, so it is not part of this guide.

BitLocker and device encryption

Windows PowerShell, as Administrator
manage-bde -status C:
Get-BitLockerVolume -MountPoint C: | Format-List VolumeStatus, ProtectionStatus, EncryptionMethod
  • On clean installs of 24H2 and later, Windows can turn on device encryption automatically. It needs a TPM and UEFI Secure Boot, and protection is only armed once someone signs in with a Microsoft account or a work account. The recovery key is then stored in that account. With local accounts only, the data is encrypted but unprotected: its key stays in the clear until the recovery key is backed up. Disk encryption check shows how to tell.
  • Make sure you have the recovery key somewhere other than this computer. This shows it, so run it where nobody can see your screen:
Windows PowerShell, as Administrator
manage-bde -protectors -get C:

File sharing (SMB)

Windows 11 24H2 and later Pro editions require SMB signing in both directions and no longer allow guest access to file shares; SMB version 1 is not installed by default. Confirm nothing has turned them back:

Windows PowerShell, as Administrator
Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol, RequireSecuritySignature
Get-SmbClientConfiguration | Select-Object RequireSecuritySignature, EnableInsecureGuestLogons
Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

Firewall

Windows PowerShell
Get-NetFirewallProfile -PolicyStore ActiveStore | Select-Object Name, Enabled, DefaultInboundAction, DefaultOutboundAction

All three profiles should be enabled, with inbound set to block.

PowerShell script block logging

Script block logging records the code PowerShell runs, including code that was obfuscated and decoded at run time, which makes it one of the most useful logs after an attack.

Group Policy: Computer Configuration, Administrative Templates, Windows Components, Windows PowerShell, Turn on PowerShell Script Block Logging. The same setting from PowerShell:

Windows PowerShell, as Administrator
if (-not (Test-Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging')) { New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -Force | Out-Null }
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -Name EnableScriptBlockLogging -Type DWord -Value 1
Get-WinEvent -LogName 'Microsoft-Windows-PowerShell/Operational' -FilterXPath '*[System[EventID=4104]]' -MaxEvents 20 |
  Format-List TimeCreated, Message
  • Events are written as event ID 4104 in the Microsoft-Windows-PowerShell/Operational log.
  • PowerShell 7 is configured separately, through its own "PowerShell Core" policy templates, and logs to its own log.
  • Scripts can contain secrets, so the log can too. Microsoft recommends pairing it with Protected Event Logging.

Smart App Control and Secure Boot

  • Smart App Control blocks untrusted and unsigned apps. It used to require a clean install to turn back on. Microsoft says recent Windows updates let you re-enable it from Windows Security without reinstalling, where the device supports it; a device in S mode, or one where it was turned off because optional diagnostic data was not sent, still needs a reset.
  • Secure Boot: Microsoft says the Secure Boot certificates used by most Windows devices started expiring in June 2026, and monthly updates are rolling out the replacements. Keep Windows and the computer's firmware updated. Check that Secure Boot is on:
Windows PowerShell, as Administrator
Confirm-SecureBootUEFI

Checklist

  • Windows 11 25H2 or 26H2, with the latest monthly update.
  • Optional diagnostic data off; policy set to required.
  • Recall removed or snapshots turned off.
  • Defender in normal mode; standard protection rules on; other rules audited.
  • LSA protection and memory integrity running.
  • BitLocker on, with the recovery key stored away from the computer.
  • SMB 1 absent, signing required, guest access off.
  • Firewall on for all profiles; script block logging on.

Quick lookups

One-line checks and fixes for the ports, files and settings in this guide, one page each.

Sources