{"version":"2.1.326","anchor":"powershell-blocks-using-module-requires-parsing","canonical_anchor":"powershell-blocks-using-module-requires-parsing","heading":"PowerShell commands that can load code while being read are refused","tier":"notice","area":"PowerShell","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/powershell-blocks-using-module-requires-parsing","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### PowerShell commands that can load code while being read are refused\n\nClaude Code now refuses PowerShell commands with `using module`, `using assembly`, `#requires` or `Import-DscResource` instead of analysing them\n\n**Unclear.** This sits behind a remote switch whose default is not known, so whether the refusal applies to you is unclear.\n\n**What**\n\nBefore running a PowerShell command, Claude Code reads it to decide whether it needs your permission. It no longer reads commands that contain any of these, and refuses them instead:\n\n- `using module`\n\n- `using assembly`\n\n- `#requires`\n\n- `Import-DscResource`\n\nPowerShell can load and run code just from reading these lines, before the command itself runs.\n\n**Why**\n\nThis closes a gap in permission checking: simply examining such a command could run code you never approved. If your commands rely on these lines, expect them to be refused.\n\n- Area: PowerShell\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}