r/PowerShell • • Mar 03 '26

Constrained Language Mode Implementation

Hi everyone,

I am working on implementing PowerShell Constrained Language Mode as part of a security uplift. From what I understand, this is a computer-level setting, and if enforced through Windows Defender Application Control, it applies to the entire device. Unsigned scripts would then run in Constrained Language Mode instead of Full Language Mode.

For those who have implemented this in production, what approach did you take? Any major gotchas or impact to be aware of? Would you recommend WDAC as Microsoft suggests, or AppLocker?

My main concern is ensuring the IT team can be excluded from the restriction where required.

Appreciate any advice.

11 Upvotes

19 comments sorted by

View all comments

Show parent comment

2

u/dodexahedron Mar 04 '26

A caveat to be aware of with #4:

Kerberos can be an issue if what you run in the remoting session or even an interactive PSSession needs to access resources beyond the target computer (double hop problem).

Be sure to take that into account, as it does represent a pretty significant restriction in an NTLM-free environment.

1

u/omglazrgunpewpew Mar 04 '26

Good call on the double hop. Def something to stay aware of.

Once you move to remoting, Kerberos won't delegate credentials by default, so anything inside the session that needs to hit a third resource will fail unless you’ve set up constrained delegation, resource-based delegation, or a dedicated automation identity. In an NTLM-free environment, you feel that immediately.

Still, I’d argue that’s an identity design issue, not a reason to avoid a management-tier model. It forces you to be explicit about how access flows, rather than relying on interactive admin tokens bouncing around the network.

1

u/dodexahedron Mar 04 '26

Totally.

Although at least with RDP, Remote Credential Guard is already taking care of the delegation (and restriction) and, to get a ticket usable for further hops, you can enter fresh credentials in the remote session, which are now protected by TLS at least.

DFS is one of the things that frequently causes issues with double-hop, due partially to referrals. And if you use any kind of derived credentials, like PIV, you have no recourse with the way Windows hard-forbids delegation of derived credentials. 😔