简体   繁体   中英

Package Manager console command without PowerShell access

to work with EntityFramework Migration, I need to have access to PowerShell, which I don't have in my company for some security reasons.

is there any way to run these command, without have access to PowerShell?

here is the error get when I start Package Manager Console 在此处输入图片说明

You will have to set the execution policy. By default it's restricted that's what blocking the execution. Just run from PowerShell command prompt!

Set-ExecutionPolicy Unrestricted 

If you don't have admin rights, you can set the policy just for yourself!

Set-ExecutionPolicy Unrestricted -Scope CurrentUser

Remember to run them as command not as a script.

follow this steps :

  1. Run Powershell with administrator privilege
  2. Type this command :

    Set-ExecutionPolicy Bypass -Force

  3. Press Enter

  4. Restart you're program

and if u don't have access to powershell follow this way :

  1. go to Regedit.exe and follow this path :

    HKEY_LOCAL_MACHINE\\SOFWARE\\microsoft\\powershell\\1\\shelllds\\microsoft.powershell\\executionpolicy

and change of this string value Bypass

  1. go to this address :

    HKEY_LOCAL_MACHINE\\SOFWARE\\microsoft\\powershell\\1\\shelllds\\Scripted.diagnostic\\executionpolicy

and change this value to bypass

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM