function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Prakash Rai 7Prakash Rai 7 

ERROR running force:auth:web:login

Hello sfdx gurus,
In Windows 7, I get the following error when I attampt to authorize the developer hub org. The login windows to DevHub opens up that lead to next error after I put my DevHub credential.
It works fine in Mac. 

Appreciate any input.

C:\Users\raip\sfdx\sfdx-dreamhouse>sfdx force:auth:web:login -d -a DevHub
ERROR running force:auth:web:login:  Command failed with response.
 - CylancePROTECT Script Control has blocked access to this PowerShell script.
Try this:
Determine why this command failed to get an encryption key for user raip: [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File C:\Users\raip\AppData\Local\sfdx\plug
ins\node_modules\salesforce-alm\CredMan.ps1 -GetCred -Target sfdx -User local].
Prakash Rai 7Prakash Rai 7
Happens to be CylancePROTECT is a next-gen endpoint protection implemented in my corporate network. Seems to be not a DX issuse per se.
I had the issue on CredMan.ps1 (was unable to login). Steps to fix: Go to the root folder(under your user name) for .sfdx and delete all the files (json). These must have been created from the old logins. Once deleted re-run the command : sfdx force:auth:web:login -d -a DevHub
Tad Aalgaard 3Tad Aalgaard 3
Abhisek, thank you for you solution.  I was getting a parse error and deleting the .json files from the .sfdx folder in my user directory like you suggested for the original poster fixed my issue.  Hours wasted because of this.
Hi.  I am having the same issue.  Can you tell me where the root folder is located?  I'm unsure of where it is.  thanks!!!!

Nevermind, I got it... unfortunately, it did not help in my case.. getting the error:  Make sure the web address http://localhost:1717 is correct.
Eric KintzerEric Kintzer
@Abhisek - your solution was spot-on. Thank you so much.
Natalya MurphyNatalya Murphy
@Ahbisek - thank you for posting the solution.  Deleting all the files in the .sfdx folder under my user folder solved the issue
Winston Clay 8Winston Clay 8
@Ahbisek, thanks so much. I spent hours on this before coming across your solution.
Anju T 3Anju T 3
@Abhisek, Thanks for the info provided. Even i could solve the issue.