Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Redmond desk6 min

How to Harden Windows 11 with Native PowerShell Scripts (No 3rd Party Apps)

A cautious guide to hardening Windows 11 with built-in PowerShell: Defender preferences, ASR rules staged through Audit mode, firewall basics, and checks for managed devices.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can harden Windows 11 without installing anything: the useful levers are Microsoft Defender Antivirus preferences, Attack Surface Reduction (ASR) rules, and Windows Firewall, all reachable through built-in PowerShell cmdlets. The safe approach is not to paste a giant “hardening script”. It is to inspect your current state, make small changes, run ASR rules in Audit mode first, and confirm what is actually enforced. Microsoft’s documentation establishes how these controls behave; it does not offer one script that suits every PC, and nothing here guarantees security.

What Windows 11 already gives you

Microsoft’s Windows security documentation lists several distinct built-in controls. They are separate features with separate jobs, so enabling one does not cover the others:

As an Amazon Associate I earn from qualifying purchases.

  • Microsoft Defender Antivirus: real-time, behavior, and script scanning, plus cloud-delivered protection.
  • SmartScreen: reputation checks for sites, downloads, and apps.
  • Tamper protection: resists unauthorized changes to key security settings.
  • Network protection: blocks connections to malicious destinations.
  • Attack Surface Reduction (ASR) rules: block risky application and script behaviors.
  • Controlled folder access: limits which apps may change protected folders.

Windows Firewall, covered below, is the network-layer counterpart.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before you change anything

Four factors determine what will work on your machine:

#1 Best Overall
YOGOTEU Fingerprint Reader,USB Fingerprint Key Reader Advanced Security Access Window Hello Fingerprint Reader for Windows10/11 Laptops Computer
  • USB Fingerprint Key Reader suitable for Windows10/11 Hello features.
  • 360 Degrees Detection:Fingerprints can be read from any angle in 360Degrees, set up to 10 Fingerprint IDs.
  • 0.05 seconds:Fingerprints authenticated within 0.05seconds. Logins faster and more secure.
  • With intelligent learning algorithm, detection and authentication is faster and more secure.
  • Advanced Protections:Safely protect your logins and data with Fingerprint Security Device.
  • Edition: Microsoft says local ASR configuration through PowerShell or Group Policy is available on supported Windows editions. Check your edition against the current ASR documentation.
  • Antivirus state: if another antivirus product is active, Defender may be in a passive or disabled mode, and its settings may not be enforced.
  • Management: work or school devices often receive policy from Group Policy, Intune, or Configuration Manager. Those can override what you set locally.
  • Application needs: macros, installers, scripts, and admin tools can trip hardening rules.

Open Windows Terminal as administrator (right-click Start, then Terminal (Admin)), make sure you have another way back in (a second admin account or a restore point), and capture the current state so you can revert:

Get-MpComputerStatus
Get-MpPreference | Out-File "$env:USERPROFILEDesktopmp-preferences-before.txt"
Get-NetFirewallProfile | Out-File "$env:USERPROFILEDesktopfirewall-before.txt"

Treat the commands in this article as examples to verify against the current Microsoft Learn pages for your Windows build, not as a tested, universal bundle.

Keep core Defender protections enabled

Microsoft documents PowerShell configuration of cloud-delivered protection, real-time monitoring, behavior monitoring, script scanning, removable-drive scanning, and potentially unwanted application (PUA) protection through Set-MpPreference. Typical settings look like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
FIDO U2F Security Key, Thetis [Aluminum Folding Design] Universal Two Factor Authentication USB (Type A) for Extra Protection in Windows/Linux/Mac OS, Gmail, Facebook, Dropbox, SalesForce, GitHub
  • Protect Online Account - Offer a strong factor authentication to your online account. Never lose your accounts through password theft, phishing, hacking or keylogging scams.
  • Universal Compatibility - The Thetis U2F key can be used on any websites which support U2F protocol with the latest Chrome installed on your Windows, Mac OS or Linux. (Important Note: Not compatible with any email clients including Apple Mail, Mozilla Thunderbird or Microsoft Outlook)
  • FIDO-U2f-Certified - Safety is our priority. Certified by world's largest Ecosystem for Standards-based, interoperable Authentication. Only support U2F protocol (No UAF or OTP). Provide low-cost and simple solution with high security.
  • Extremly Durable - Designed with a 360° rotating metal cover that shields the USB connector when not in use. Also, crafted from a durable aluminum alloy to protect the Key from drops, bumps and scratches.
  • Portable Design - Compact, ultra-portable design allows you to take your FIDO key anywhere you need it.
Set-MpPreference -DisableRealtimeMonitoring $false
Set-MpPreference -DisableBehaviorMonitoring $false
Set-MpPreference -DisableScriptScanning $false
Set-MpPreference -DisableRemovableDriveScanning $false
Set-MpPreference -MAPSReporting Advanced
Set-MpPreference -PUAProtection Enabled
Setting What it protects
Real-time monitoring Scans files as they are opened or written.
Behavior monitoring Watches process behavior for suspicious patterns.
Script scanning Inspects scripts for malicious content.
Removable-drive scanning Includes USB and other removable media in full scans.
Cloud-delivered protection (MAPS) Queries Microsoft’s cloud for verdicts on unknown files.
PUA protection Flags unwanted bundled or low-reputation software.

Verify the result rather than assuming it. Get-MpPreference shows configured preferences; Get-MpComputerStatus shows what the engine reports, such as whether real-time protection is enabled. If the two disagree, or a command errors, suspect tamper protection, another antivirus product, or a management policy.

Stage ASR rules instead of switching them all on

ASR rules target behaviors such as launching downloaded files, running obfuscated scripts, or unusual actions by Office and other applications. Microsoft says rules in its standard protection set can typically be enabled in Block or Warn mode without prior testing, but it recommends testing other rules in Audit mode first. Audit records events without blocking anything, so you can see what would have broken.

Step 1: Put a rule in Audit mode

Each rule is identified by a GUID listed in Microsoft’s ASR rules reference. This example uses the GUID documented for blocking executable content from email clients and webmail; confirm it against the reference before use.

Rank #3
Sale
Thetis Nano-A FIDO2 Security Key Hardware Passkey Device with USB Type A, TOTP/HOTP, FIDO2.0 Two Factor Authentication 2FA MFA, Works with Windows/mac/iOS/Android/Linux/Gmail/Facebook/GitHub/Coinbase
  • Ultra-Compact FIDO2 Security Key - Plug-and-stay or carry on a keychain. This USB-A hardware security key offers portable, always-on protection for desktop and mobile use. (Item Size: 0.75 X 0.74 IN x 0.25 IN)
  • USB-A Hardware Key for All Devices - Works with USB-A ports on PC, Mac, Android, and other laptop/notebook device. Enables secure, cross-platform login with FIDO2.0 passkey support.
  • FIDO Certified Security Key - Meets FIDO and FIDO2 standards. Works with Google, Microsoft, GitHub, Dropbox, and more. Please check service compatibility before purchase.
  • Passwordless Login with Passkey - Supports passkey login via WebAuthn and CTAP2. Enjoy password-free sign-ins where supported. Not all websites or services currently support passkeys.
  • Advanced Multi-Factor Authentication - Offers 200 FIDO2 passkey slots and 50 OATH-TOTP slots. Strong, flexible 2FA/MFA support across various apps and authentication platforms.
Add-MpPreference -AttackSurfaceReductionRules_Ids BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 -AttackSurfaceReductionRules_Actions AuditMode

Step 2: Review what would have been blocked

Use normal workflows for a few days or weeks, then check the Windows event records for Defender (Event Viewer, Applications and Services Logs > Microsoft > Windows > Windows Defender > Operational). Microsoft’s ASR documentation lists the relevant event IDs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 3: Move to Block or Warn

Add-MpPreference -AttackSurfaceReductionRules_Ids BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 -AttackSurfaceReductionRules_Actions Enabled

Use Warn where the rule supports it and you want users to be able to override a block. Check which rules support Warn in the reference.

Add, Set, and Remove behave differently

  • Add-MpPreference appends and preserves existing rule configuration.
  • Set-MpPreference overwrites the rule configuration you specify, so a careless call can wipe rules you already had.
  • Remove-MpPreference removes specified rules.

Default to Add unless you deliberately want to replace the list. Inspect the current list with (Get-MpPreference).AttackSurfaceReductionRules_Ids.

Rank #4
AHANIN Windows Hello Fingerprint Reader, USB Dongle for Windows 11 & 10
  • Point 1 【WINDOWS HELLO COMPATIBLE】 Works with Windows 10 and Windows 11 Windows Hello as a Windows Hello fingerprint reader. This fingerprint reader for Windows 11 supports one-touch fingerprint login to replace passwords, for quick unlock of laptops and desktops.
  • Point 2 【PLUG & PLAY, NO DRIVERS REQUIRED】 This plug and play USB fingerprint reader works as a usb fingerprint reader windows 11 dongle. Insert it into any USB port for recognition without extra software or drivers. Its slim compact shape will not block adjacent USB slots on your PC, suitable as a fingerprint reader for pc.
  • Point 3 【360° FAST FINGERPRINT SCANNING】 This fingerprint scanner features a 360° all-angle sensor for steady fingerprint matching. The biometric sensor can store multiple fingerprints at the same time, matching the use of multi-user shared desktop and laptop computers.
  • Point 4 【ENCRYPTED BIOMETRIC SECURITY】 This fingerprint reader has a built-in encryption chip. The chip blocks unauthorized access to PC login accounts, personal files and stored data. It adds password-free security for fingerprint login on Windows devices.
  • Point 5 【PORTABLE FOR WINDOWS DEVICES】 This lightweight biometric finger print device fits home, office and travel scenarios. It works with most Windows laptops, desktops and all-in-one PCs, for convenient unlock when you carry computers outside.

Be stingy with exclusions

When a rule breaks a legitimate app, resist broad folder or process exclusions. Exclusions weaken the protection the rule gives, so scope them as narrowly as possible, or leave the rule in Audit mode until you understand the cause.

Network protection and Controlled folder access

These two follow the same pattern. Start in audit, then enforce:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Set-MpPreference -EnableNetworkProtection AuditMode
Set-MpPreference -EnableControlledFolderAccess AuditMode

Controlled folder access in particular can block legitimate programs from saving into Documents or Pictures, so audit first and allow specific trusted apps rather than disabling the feature.

Best Value
TNP USB-C Fingerprint Reader, Windows Hello PC Scanner for Windows 11/10
  • Support Windows 10 / 11 Hello Biometric Authentication: Plug and play with updated Windows OS, provides instant access for Windows computers. Tasks such as login, sign in or unlock can be accomplished with a touch of a finger, no need to remember usernames and passwords
  • Up to 5 Fingerprint Registration: Allow family members, close friends, or colleagues to gain access to a single computer. 360° all direction fingerprint registering for better accuracy and faster response.
  • Paralleled Software Support: With Smart ID Encryption, encrypting your files has never been so easy. You can specify a folder as an encrypted zone, once a file is copied into the folder, it automatically be encrypted.
  • Gets Smarter Over Time: With each fingerprint registry, the scanned data is added to the profile of the enrolled finger. So, the more you use it, the more accurate it gets. Allowing faster access.
  • All You Need in a Nano Formfactor: Small and lightweight, takes up no space. Drop it in your pocket and you wouldn't even notice a thing.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why your local settings may not stick on a managed device

Microsoft’s ASR guidance ranks configuration methods, and local PowerShell is the lowest precedence. Group Policy and management tools such as Intune or Configuration Manager can override conflicting local values, and Microsoft notes local settings can be overridden at startup or when policy is applied. A command that succeeds in the console may therefore be reverted later.

Method Scope Precedence Reporting and central control Fits
Local PowerShell One device Lowest None built in; you check each machine Personal or unmanaged PCs
Group Policy Domain or local policy Overrides local PowerShell Policy-based Domain-joined or policy-managed PCs
Intune or Configuration Manager Fleet Overrides local PowerShell Central reporting and deployment Organizations

If your PC is managed by an employer or school, do not fight the policy: changes belong with whoever administers it. For an unmanaged home PC, local PowerShell is sufficient and no paid service is needed to use these built-in features.

Leave Windows Firewall on, and change it narrowly

The NetSecurity cmdlets manage firewall profiles and rules. Start by looking:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-NetFirewallProfile | Format-Table Name, Enabled, DefaultInboundAction, DefaultOutboundAction
Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True

Microsoft is explicit about not turning it off: “Microsoft recommends that you don’t disable Windows Firewall because you lose other benefits, such as the ability to use Internet Protocol security (IPsec) connection security rules, network protection from attacks that employ network fingerprinting, Windows Service Hardening, and boot time filters.” (Microsoft, Manage Windows Firewall With the Command Line.) The same page says stopping the firewall service is unsupported and may cause problems in Windows or apps. If you need an app to work, add a rule for that program and profile instead of disabling the firewall or allowing broad inbound ranges.

Review existing rules with Get-NetFirewallRule -Enabled True -Direction Inbound, and remove only rules you can identify and no longer need.

Verify, keep notes, and maintain

  • Compare configured values (Get-MpPreference, Get-NetFirewallProfile) against effective state (Get-MpComputerStatus), especially if any policy management exists.
  • Re-run the checks after a reboot, since policy can reapply at startup and overwrite local values.
  • Change one category at a time, so you know which change caused a problem.
  • Recheck Microsoft’s current documentation after major Windows updates; rules, defaults, and parameters change.
  • Roll back using the saved before-files: restore a rule’s mode with Add-MpPreference (or remove it with Remove-MpPreference) and restore firewall profile settings by hand.

The sources behind this guide document the individual controls and how they are configured. They do not establish a single complete script validated across Windows 11 editions and management states, so build your own from the pieces above and test it on your hardware.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.