Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, January 26, 2017 2:44 AM
"Failed to initialize the powershell host if your powershell execution policy setting is set too allsigned open the package manager console to initialize the host first"
All replies (2)
Thursday, January 26, 2017 5:51 AM
Hi sergio36791,
Thank you for posting in MSDN forum.
According to the error information, please take a look at :
Please have a try with Murries's solution:
1. Open Powershell as an Administrator
2. Enter the following command "Set-ExecutionPolicy RemoteSigned"
3. Restart Visual Studio and the Package Manager Console worked as expected
It is important to note however that Powershell will give you a warning
"The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic. Do you want to change the execution policy?"
And should be careful of enabling this feature and should read more information in the help topics about the security risks.
In addition, you might have to change the permissions on a different version of PowerShell (32-bit and 64-bit versions require separate permissions).
From How to Tell if PowerShell is 32-bit or 64-bit:
- 64-bit PowerShell Path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- 32-bit PowerShell Path: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
If the error persists, please feel free to tell me, I will help you got further troubleshooting.
Best Regards,
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].
Tuesday, February 7, 2017 5:17 AM
Hi sergio,
Is there any update about this issue? Have you solved it successfully?
Would you mind sharing your result or solution here?
If you think my reply is helpful, please mark my reply as answer, it will be easier for other members who meet similar problem.
If the error persists, please let me know, I will help you for more troubleshooting,
Best Regards,
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].