Update PowerShell version in Visual Studio 2017

I ran the following in Visual Studio 2017 Package Manager Console -

PM> $PSVersionTable.PSVersion

 Major  Minor  Build  Revision
 -----  -----  -----  -------- 
 2      0      -1     -1

      

When I run the same command from a PowerShell window, I get -

PS C:\>  $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

      

This is giving me a problem because I want to run something in the package manager that requires PowerShell 3 or higher.

+5


source to share


3 answers


Finally I started working. I updated Visual Studio 2017 to 15.3.3 (there was no update when posting the question) and I installed several Windows updates as well.

Here are two windows being updated -



https://support.microsoft.com/en-us/help/3134760/windows-management-framework-5-0-rtm-on-windows-7-sp1-and-windows-serv

https://www.microsoft.com/en-us/download/details.aspx?id=40855

+1


source


You are not using the latest version of the tools. Latest version for this page:

https://marketplace.visualstudio.com/items?itemName=AdamRDriscoll.PowerShellToolsforVisualStudio2017-18561

      



Lists version / update as:

3.0.585 updated 7/6/2017, 9:04:51 AM.

      

0


source


The last of the powershell tools requires powershell v3 to be installed. I cannot install v3 to install in any way, including chocolate (which I also cannot install).

I also tried to use the previous version of developer tools and it also doesn't work with Visual Studio Professional 2017 v15.9.11.

0


source







All Articles