{"id":"fcb2dbdf-d7ad-491c-97d0-c253a9d9a92f","slug":"powershell-file-path-cannot-be-loaded-because-5098","url":"https://api.modalhub.ai/r/powershell-file-path-cannot-be-loaded-because-5098","urls":{"html":"https://api.modalhub.ai/r/powershell-file-path-cannot-be-loaded-because-5098","md":"https://api.modalhub.ai/r/powershell-file-path-cannot-be-loaded-because-5098.md","json":"https://api.modalhub.ai/r/powershell-file-path-cannot-be-loaded-because-5098.json","history":"https://api.modalhub.ai/r/powershell-file-path-cannot-be-loaded-because-5098/history"},"symptom":"File <path> cannot be loaded because running scripts is disabled on this system.","command":null,"exit_code":null,"tool":"powershell","version":"5.1","os":"windows","date":"2026-10-28","cause":"Windows client PCs default to the Restricted execution policy, which blocks every .ps1 file, including the npm/npx PowerShell shims","risk":{"level":"caution","flags":[{"code":"elevated","args":["set-executionpolicy"]}],"v":1},"fix":{"type":"command","body":"Get-ExecutionPolicy -List     # all Undefined = effective Restricted, the Windows client default\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser   # no admin needed\nUnblock-File -Path <path>     # only for a downloaded script you trust"},"repro":"none","check":"Get-ExecutionPolicy","notes":"RemoteSigned runs local scripts and blocks unsigned downloaded ones. No policy change: call the .cmd shim (npm.cmd, npx.cmd). A Group Policy (MachinePolicy/UserPolicy) overrides every scope; then ask IT.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[]},"arms":[{"range":"5.1","status":"works"}],"dead_ends":[{"attempt":"Set-ExecutionPolicy Bypass -Scope Process","why":"lasts only for that session; the next terminal fails again","reports":1},{"attempt":"Set-ExecutionPolicy Unrestricted (or Bypass) -Scope LocalMachine","why":"needs admin, changes every user and drops the signature check on downloaded scripts; RemoteSigned for CurrentUser is enough","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-10-28T18:26:48.035153Z","updated_at":"2026-10-28T18:26:48.035153Z","last_confirmed_at":null,"ledger":{"first_seq":83,"last_seq":83,"head_hash":"a2b5169707c705ddc20b1a211c05a0e15ee8bf9d8c99f44f1a8766d5d01ecd1e"}}
