Windows Endpoints
Note: You configure these controls in Microsoft Intune, Group Policy or Microsoft Configuration Manager. They are next to SenseOn, not in it. Other pages document the endpoint controls of SenseOn: Endpoint Protection (EPP), Active Response and USB Controls.
This page applies to Windows 10 22H2 and Windows 11. Policy names and the navigation paths in Intune change over time. Before you rely on a specific setting, compare it with the linked source.
Delivery obeys the same channel rules as the firewall and browser guides. Select one management plane for each setting. Do not configure the same policy from two channels at the same time. Split ownership is the most common cause when a policy does not apply and shows no error.
PowerShell
People ask about this subject more than any other subject. Usually they ask "can we just disable PowerShell for users". The honest answer has three parts. You can disable it. It will not give the result that you want. There is a better method.
Why blocking powershell.exe does not work
PowerShell is not the executable. It is an engine in System.Management.Automation.dll, and powershell.exe is only one of many hosts that load this engine. If you block or remove the executable, all of these paths stay open:
powershell_ise.exe, and PowerShell 7 aspwsh.exe. PowerShell 7 installs separately, and Windows PowerShell policy does not cover it.- Any application that loads the automation assembly directly. This technique is widely available in commodity tools, and it is easy to implement again.
wmic,mshta,rundll32,regsvr32,msbuildand the rest of the signed-binary execution surface. These binaries get the same result with no PowerShell at all.
If you block the executable, you also break much legitimate machinery. This machinery includes Intune remediation scripts, Configuration Manager tasks, software deployment, printer and VPN client installers, and your own operational tools.
What we actually recommend: limit what PowerShell can do, not whether it can run. Also log all that it does. This combination is more effective against the techniques that we see. It also causes considerably less disruption.
Constrained Language Mode
Constrained Language Mode restricts PowerShell to a safe subset of the language. Core cmdlets and scripts still work. But the .NET type access, reflection and Win32 API calls that offensive tools depend on do not work. Almost all administrative scripts work as before. Almost all offensive tools break.
The supported method to enforce it is as a side effect of application control, not as a standalone setting:
| Route | How it works | Notes |
|---|---|---|
| WDAC (App Control for Business) | A WDAC policy in enforced mode automatically puts PowerShell into Constrained Language Mode for each script that is not explicitly trusted. Trusted, signed scripts continue to run in Full Language Mode. | The recommended route. It also gives general application control. |
| AppLocker | An enforced AppLocker script rule collection has the same effect on PowerShell language mode. | Simpler to deploy than WDAC, where WDAC is not possible yet. |
__PSLockdownPolicy environment variable |
Sets the language mode directly. | Not a security boundary. Microsoft states clearly that this is for tests only. A user who can set their own environment variables can undo it. Do not use it as a control. |
Start WDAC in audit mode. In audit mode, WDAC logs what it would block, but it does not block it. Before you enforce, these events are the only realistic method to find what your estate really runs. Microsoft publishes a recommended block rules list for the signed binaries that attackers frequently abuse to bypass application control. Microsoft also publishes a recommended driver block rules list for vulnerable drivers. It is useful to adopt both lists, even if the rest of your policy is permissive.
Remove PowerShell 2.0
PowerShell 2.0 is older than script block logging, AMSI and Constrained Language Mode. The command powershell -version 2 starts it, and this downgrades out of all three. It is an optional feature, and it has no legitimate use now.
Remove the MicrosoftWindowsPowerShellV2Root optional feature across the estate. Also make sure that its dependency, .NET Framework 2.0 and 3.5, is absent, because its presence makes the downgrade possible.
Logging is worth more than blocking
If you do only one thing on this page, do this thing. It is free, and it breaks nothing. It is the largest single improvement that you can make to the quality of each investigation that involves a Windows endpoint.
Computer Configuration > Policies > Administrative Templates > Windows Components > Windows PowerShell
| Policy | Setting | What it gives you |
|---|---|---|
| Turn on PowerShell Script Block Logging | Enabled | Records the deobfuscated content of each script block when it executes, to event ID 4104. Obfuscation does not stop it, because Windows writes the log after the runtime decodes the content. This is the event with the highest value on Windows. |
| Turn on Module Logging | Enabled, with module names set to * |
Detail of pipeline execution. Useful but more noisy, and script block logging mostly replaces it. Enable it if the volume is acceptable. |
| Turn on PowerShell Transcription | Enabled, with an output directory | Full session transcripts, with the output. Script block logging does not capture the output. Write to a protected central share, not to a local path that the user can clear. |
Do not enable Log script block invocation start / stop events. The volume is high and the additional value is low.
Do not use execution policy as a security control.
Set-ExecutionPolicy Restrictedprevents accidental script execution. Three methods bypass it:-ExecutionPolicy Bypass, a pipe toInvoke-Expression, or a read of the file. Microsoft documents it as a safety feature, not a security boundary. Do not present it to an auditor as a security control.
What SenseOn does with this
The Universal Sensor collects process execution telemetry, with command lines. It does this independently of Windows event logging. Thus SenseOn sees PowerShell activity also when you do not enable the logging policies on this page. If you enable script block logging, you also get the decoded script body. The decoded body changes "an encoded command ran" into "here is exactly what it did". You can query both in Hunt Lab through the endpoint_process table.
Attack Surface Reduction rules
Attack Surface Reduction (ASR) rules are part of Microsoft Defender Antivirus. If Defender Antivirus runs in active mode, they are available at no additional licence cost. They block specific behavioural patterns, not specific files. That is why they stop techniques, not only specific samples.
In our experience, these are the endpoint controls with the highest value for a Windows estate. They directly address the two halves of the most frequent question about this page: executable content that arrives by email, and script-based execution.
Deploy through Intune Endpoint security > Attack surface reduction, or Group Policy under Windows Components > Microsoft Defender Antivirus > Microsoft Defender Exploit Guard > Attack Surface Reduction.
Each rule supports Not configured, Audit, Block and Warn. Deploy every rule in Audit first. Some rules will break line-of-business applications that shell out to other executables. The Office child process rule especially can do this.
Email and document-borne execution
| Rule | Why it matters |
|---|---|
| Block executable content from email client and webmail | This is the "stop things running from email attachments" control. If executable files and scripts arrive through Outlook or webmail, this rule blocks their execution. |
| Block all Office applications from creating child processes | Breaks the single most common macro payload pattern, in which a document spawns PowerShell, cmd or mshta. Of this set, it has the highest risk of false positives. Thus, audit it correctly. |
| Block Office applications from creating executable content | Documents cannot write executables to disk. |
| Block Office applications from injecting code into other processes | Rarely legitimate. Low breakage. |
| Block Win32 API calls from Office macros | Removes the macro path to direct API abuse. |
| Block Adobe Reader from creating child processes | The PDF equivalent of the Office rule. It is cheaper to enable, because the false positive rate is much lower. |
Script and loader execution
| Rule | Why it matters |
|---|---|
| Block JavaScript or VBScript from launching downloaded executable content | Targets the script downloader stage directly. |
| Block execution of potentially obfuscated scripts | Catches obfuscation as a signal by itself. Some legitimate installers are packed enough to trigger this rule. Thus, audit it. |
| Block executable files from running unless they meet a prevalence, age or trusted list criterion | Strong and disruptive in equal measure. Consider it only for a standard build that you understand well. |
| Block untrusted and unsigned processes that run from USB | Works together with USB Controls for removable media. |
Credential and persistence protection
| Rule | Why it matters |
|---|---|
| Block credential stealing from the Windows local security authority subsystem | Blocks the common LSASS access pattern for credential dumping. Also refer to Credential protection. |
| Block process creations originating from PSExec and WMI commands | Targets lateral movement. If you use Configuration Manager for remote execution, this rule will break it. Do a check first. |
| Block persistence through WMI event subscription | WMI event subscription is a quiet, durable persistence technique. In most estates, it has almost no legitimate use. Low breakage. |
| Block abuse of exploited vulnerable signed drivers | The bring-your-own-vulnerable-driver path to kernel-level access. |
| Use advanced protection against ransomware | Behavioural ransomware protection. It adds to Reflex, and it does not duplicate it. |
| Block webshell creation for servers | Exchange and IIS servers specifically. |
Exclusions. ASR supports exclusions for each rule. Use them narrowly. Record the reason for each exclusion. A broad exclusion path silently disables the rule in the exact location that attackers prefer. This is especially true for a path that covers a full user profile or a software distribution folder.
Microsoft maintains the current rule names, GUIDs, supported operating system versions and the caveats for each rule in the Microsoft ASR rules reference. Take the GUIDs from that reference, not from a secondary source. This page is also a secondary source.
Office macros
Macros are still a live route for initial access. This is especially true for documents that arrive through channels other than email, because email delivery now has good defences.
- Block macros from the internet. By default, Office blocks VBA macros in files that have the Mark of the Web. Make sure that this default is still on in your tenant. Enforce it with a policy, and do not rely on the default. Use Block macros from running in Office files from the Internet, enabled for each application.
- Set VBA macro notification settings to disable with notification. Where the business can accept it, set them to disable all without notification.
- Do not allow users to bypass Mark of the Web when they unblock files. If a workflow makes this necessary, change the workflow. Typically, deliver files through a trusted SharePoint or OneDrive location, not as attachments.
- Disable XL4 macros (Excel 4.0 macros). These macros are older and less visible, and attackers still abuse them. Set the macro notification setting for XL4 to disable without notification.
- Consider blocking legacy file formats at the mail gateway. Refer to Email and Collaboration.
Most of these controls use Mark of the Web. Thus, anything that removes the mark weakens all of these controls. Container formats are the usual cause. In the past, ISO, IMG, VHD and some archive software did not propagate the mark to their contents. Keep Windows and your archive tools up to date. At the gateway, block the container formats that are not necessary for your organisation.
AutoPlay and AutoRun
These controls are different from the email controls on this page, but it is still useful to set them.
Computer Configuration > Policies > Administrative Templates > Windows Components > AutoPlay Policies
| Policy | Setting |
|---|---|
| Turn off AutoPlay | Enabled, for All drives |
| Disallow Autoplay for non-volume devices | Enabled |
| Set the default behaviour for AutoRun | Enabled, Do not execute any autorun commands |
Modern Windows already disables AutoRun for removable media. But the policies remove the other paths, and a user cannot enable them again. Use these policies with the ASR rule for unsigned processes from USB. If enforcement and visibility of the devices themselves are necessary, also use SenseOn USB Controls.
Local administrator rights
Removal of standing local administrator rights from standard users is the single most effective endpoint control. It is also consistently the least popular.
- Standard users by default. When endpoint compromise succeeds, the cause is usually that the user could install software. If you remove that right, you remove the outcome, not only the alert.
- Windows LAPS for the built-in local administrator account. It became part of Windows in April 2023, and you do not install it separately. It gives each device a random local administrator password, and it rotates the password. Thus, one recovered local hash cannot unlock the estate. Configure it to back up to Entra ID or Active Directory, as applicable to your join type.
- Disable or rename the built-in Administrator where it is not necessary. Never use a shared local administrator password. If you do nothing else in this section, remove the shared password.
- Provide a sanctioned elevation route. This can be a privilege management product, an approved software portal, or Endpoint Privilege Management in Intune. Without a sanctioned route, users find their own way. Then you lose visibility and control.
Credential protection
| Control | What it does |
|---|---|
| Credential Guard | Uses virtualisation-based security to isolate LSASS secrets. Even a process with SYSTEM cannot read them. Enabled by default on new installations of Windows 11 Enterprise that meet the hardware requirements. Do not assume that it is on. Do a check. Also do a check for incompatibility with any third-party authentication provider. |
| LSA protection (RunAsPPL) | Runs LSASS as a protected process. Weaker than Credential Guard, but it works where Credential Guard cannot work. Enable it in audit mode first, because some legitimate software injects into LSASS. |
| ASR credential stealing rule | Blocks the common LSASS handle access pattern. It complements the other controls, but it does not replace them. |
| Disable WDigest | Windows does not cache cleartext credentials in memory. Disabled by default on supported Windows versions. But look for a legacy policy that enables it again. |
| Restrict cached domain credentials | Reduce the number of cached logons where the estate has a reliable connection. Balance this against the needs of users who really are mobile. |
Verifying with SenseOn
After each change, make sure that it applied across the estate, not only on the device that you used for the test:
- Hunt Lab against
endpoint_process. Find the PowerShell invocations, encoded commands and process parentage that a new ASR rule is now expected to block. - Assets to find devices that do not report. Usually, policy also did not get to these devices.
- On an individual endpoint,
Get-MpPreferencereturns the ASR rule IDs and the actions that are in force now. This is the fastest method to make sure that a rule is really in Block, not in Audit.
Go live checklist
- [ ] Delivery channel chosen per setting, with no overlap between Intune, Group Policy and Configuration Manager
- [ ] PowerShell script block logging enabled estate wide
- [ ] PowerShell transcription writes to a protected central location
- [ ] PowerShell 2.0 optional feature removed
- [ ] WDAC or AppLocker deployed in audit mode, with the Microsoft recommended block rules adopted
- [ ] Constrained Language Mode shown to be in effect after application control is enforced
- [ ] All applicable ASR rules deployed in Audit, reviewed for a full business cycle, then moved to Block
- [ ] ASR exclusions documented with a reason and an owner
- [ ] Macro policy enforced (XL4 also), and Mark of the Web bypass prevented
- [ ] AutoPlay and AutoRun disabled by policy
- [ ] Standing local administrator rights removed, with a sanctioned elevation route in place
- [ ] Windows LAPS deployed, shared local administrator passwords eliminated
- [ ] Credential Guard or LSA protection examined and in force
Related pages
- Firewall Configuration and Browser Security Policy for the other halves of endpoint policy.
- Active Directory for the domain-side controls that these controls depend on.
- USB Controls and Endpoint Protection (EPP) for the endpoint enforcement of SenseOn.
- EPP Exclusions if a hardening change also makes a SenseOn exclusion necessary.
- Malware playbook and Ransomware playbook for the case types that these controls prevent.
Sources
We did a check of all URLs on 19 August 2026.
- Attack surface reduction rules reference
- Enable attack surface reduction rules
- PowerShell language modes
- About execution policies
- App Control for Business design guide
- Applications that can bypass App Control
- Microsoft recommended driver block rules
- Macros from the internet are blocked by default in Office
- Windows LAPS overview
- Credential Guard overview
- Configuring additional LSA protection