How to Fix SFDX Script Execution Policy Error on Windows

Опубликовано: 03 Июль 2026
на канале: infoMagnet
6
0

Struggling with the SFDX Script Execution Policy Error on Windows?

In this quick tutorial, I’ll show you exactly how to fix the issue step-by-step so you can start using Salesforce DX without any blockers.

🔧 What you’ll learn:
Why does the execution policy error occur
How to fix it using PowerShell

💡 This is a common issue faced by Salesforce Developers while setting up SFDX CLI.

Commands used in this video:
Get-ExecutionPolicy -List
Set-ExecutionPolicy -ExecutionPolicy bypass -Scope CurrentUser

Error:
sfdx: File C:\Users\xxxx\AppData\Roaming\npm\sfdx.ps1 cannot be loaded because running scripts is disabled on this
system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
sfdx
~~~~
CategoryInfo : SecurityError: (:) [], PSSecurityException
FullyQualifiedErrorId : UnauthorizedAccess

#ExecutionPolicy
#UnauthorizedAccess #SFDX #SalesforceDX #DeveloperTips #PowerShell