Are you using CLI?If so, have you authorized it using below command?
sfdx force:auth:web:login -h
Related links: https://developer.salesforce.com/forums/?id=9060G000000MVBsQAO https://stackoverflow.com/questions/43500995/cannot-run-cmd-from-powershell-access-denied https://trailhead.salesforce.com/en/content/learn/projects/quickstart-vscode-salesforce
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
When I am executing this command in cmd by pressing windows+R then it opens a window for entering login credentials but when I enter it in Visual Studio then this error comes up even i have already installed Extension Pack. Could you please suggest why it is not working in V.Studio.
Are you using CLI?If so, have you authorized it using below command?
sfdx force:auth:web:login -h
Related links: https://developer.salesforce.com/forums/?id=9060G000000MVBsQAO
https://stackoverflow.com/questions/43500995/cannot-run-cmd-from-powershell-access-denied
https://trailhead.salesforce.com/en/content/learn/projects/quickstart-vscode-salesforce