How to upgrade PowerShell version - windows

Lately, firing up PowerShell, I noticed that there is a phrase that says:
Install the latest PowerShell for new features and improvements!
https://aka.ms/PSWindows
So why not trying it following the actual Microsoft documentation:
I run $PSVersionTable and the version installed is 5.1
I run winget search Microsoft.PowerShell and it says that version 7.2 is available as well as the 7.3 preview version
I run winget install --id Microsoft.Powershell --source winget and version 7.2 is installed
I run $PSVersionTable again and I'm still on 5.1
Let's try to install it through dotnet:
I run dotnet tool install --global PowerShell and the terminal says Tool 'powershell' (version '7.2.6') was successfully installed.
I run $PSVersionTable and I'm still on 5.1
I'm following the current Microsoft documentation, where am I wrong?

Powershell 7 (core) is its own application. Search for pwsh.exe and run that

Related

can't install winget tool via ms store and cmd prmt

It shows failed whenever i am trying to update winget tool for completing the installation process.
I have installed it from microsoft store and also tried it on cmd prmt but nothing works.

Installed Tesseract 4.1.0 on Windows but --version in cmd is showing version 3.05.00dev

As the title says I installed Tesseract version 4.1.0 which is also shows under apps and features but when I type tesseract --version in cmd it shows 3.05.00dev
according to this tutorial:
https://medium.com/quantrium-tech/installing-and-using-tesseract-4-on-windows-10-4f7930313f82
it should show at least 4.0
then I uninstalled Tesseract and typed tesseract --version in cmd and it still shows up as 3.05.00dev but I can't find anything when I search for "tesseract" on the hdd.
What is wrong here?
That simple means you have another installation of tesseract (3.05.00dev) somewhere and you need to uninstall it.
If you can not find it in installed app, try this command in cmd:
where tesseract
It should reveal you where is tesseract installed and just remove it.

Vagrant cannot be started on Windows 7 64 bits requires version upgrades

I downloaded vagrant for Windows at this link
https://www.vagrantup.com/downloads
I have just installed Vagrant on Windows 7 64 bit. When I type vagrant up to start it, it displays the following error below at command prompt. How do I upgrade from version 2 to 3
C:\hhvm-vagrant>vagrant up
Vagrant failed to initialize at a very early stage:
The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.
Installed version: 2
Minimum required version: 3
It was resolved by installing windows management Framework version 3.0
If you update the powershell version to 3.0, the problem will be resolved.

netcore web app - It was not possible to find any compatible framework version

I'm trying to use VSCode with .Net Core web applications but I'm stuck at the begining. I installed dotnet sdk 2.0.2 and I created a web application by using yeoman.
I used dotnet restore command and after that I used dotnet run command. But on dotnet run command it keeps saying 'can't find any compatible framework version'. Check the error below.
So how can I run my web app? I tried to change version too but I had same results.
Using launch settings from /Users/kadir/Documents/Development/WebApplications/firstMvcTutorial/firstMvcCoreWebApp/Properties/launchSettings.json...
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '1.0.5' was not found.
- Check application dependencies and target a framework version installed at:
/
- Alternatively, install the framework version '1.0.5'.
Solved it.
I downloaded and installed Microsoft.NETCore.App 1.0.5 from this link.
After that I changed version to 2.0.0 on global.json. Then I restored dotnet with dotnet restore and I run app with dotnet run.
But this time I had a problem with System.Security.Cryptography.Native.
.
I applied commands below and fixed my problem. Now I can run my web application.
brew update
brew install openssl
mkdir -p /usr/local/lib
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

How to uninstall PowerShell 5.1 and revert to older version on Windows 7

Needing to test an upgrade to PowerShell 5.1 and hoping to revert to an older version on this machine. Tried uninstalling Windows Management Framework 5.1: KB3191566 with no success.

Resources