powershell 7.3 - Set it as Default


gnulab

Member
Local time
1:43 PM
Posts
24
OS
Windows 11
Hi,

I have upgraded my powershell to 7.3 using this method:

winget install --id Microsoft.Powershell --source winget

from within powershell.

My question is, how do I make it as a default powershell when I launch it via Win + X, or Start -> Powershell

Launching it via Win + X, $PSVersionTable still says

Code:
Name                           Value

----                           -----

PSVersion                      5.1.22000.832

PSEdition                      Desktop

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

BuildVersion                   10.0.22000.832

CLRVersion                     4.0.30319.42000

WSManStackVersion              3.0

PSRemotingProtocolVersion      2.3

SerializationVersion           1.1.0.1


The setting at
System -> Privacy & Security -> For Developers -> Choose the default terminal app = Windows Terminal (1.15.2875)


Thank you.
 
Windows Build/Version
21H2/2200.1219

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
I have done some looking and it does not seem straight forward. I did find an article from Microsoft and it looks like they provide the necessary information needed to be set in terminal to be able to set that default.


Look at specifically Using Powershell 7 side-by-side with Windows Powershell 5.1.
 

My Computer

System One

  • OS
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Alienware M15 Ryzen Edition
    CPU
    AMD Ryzen 9 5900HX
    Memory
    16 GB DDR4
    Graphics Card(s)
    Nvidia RTX 3070
    Hard Drives
    1TB SSD
    Browser
    Edge
    Antivirus
    Defender
Probably via IFEO? Something like this:
Code:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\powershell.exe" /v "Debugger" /t REG_SZ /d "C:\Program Files\WindowsApps\Microsoft.PowerShell_7.3.0.0_x64__8wekyb3d8bbwe\pwsh.exe" /f

Replacing right click Start menu is as simple as replacing the shortcut:
Code:
%AppData%\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk

P.S. To start it from Run - pwsh
 

My Computer

System One

  • OS
    Windows 11 Home
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 3600 & No fTPM (07/19)
    Motherboard
    MSI B450 TOMAHAWK 7C02v1E & IFX TPM (07/19)
    Memory
    4x 8GB ADATA XPG GAMMIX D10 DDR4 3200MHz CL16
    Graphics Card(s)
    MSI Radeon RX 580 ARMOR 8G OC @48FPS (08/19)
    Sound Card
    Creative Sound Blaster Z (11/16)
    Monitor(s) Displays
    24" AOC G2460VQ6 (01/19)
    Screen Resolution
    1920×1080@75Hz & FreeSync (DisplayPort)
    Hard Drives
    ADATA XPG GAMMIX S11 Pro SSD 512GB (07/19)
    PSU
    Seasonic M12II-520 80 Plus Bronze (11/16)
    Case
    Lian Li PC-7NB & 3x Noctua NF-S12A FLX@700rpm (11/16)
    Cooling
    CPU Cooler Noctua NH-U12S@700rpm (07/19)
    Keyboard
    HP Wired Desktop 320K + Rabalux 76017 Parker (01/24)
    Mouse
    Logitech M330 Silent Plus (04/23)
    Internet Speed
    400/40 Mbps via RouterOS (05/21) & TCP Optimizer
    Browser
    Edge (No FB/Google) & Brave for YouTube & LibreWolf for FB
    Antivirus
    NoAV & Binisoft WFC & NextDNS
    Other Info
    Headphones: Sennheiser RS170 (09/10)
    Phone: Samsung Galaxy Xcover 7 (02/24)
Few days back before I upgraded the powershell on my laptop, I had successfully did it on my another laptop. Now I can't remember the steps to replicate it.

Grrr.....
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
Have you tried the Settings in Terminal ?pwsh.PNG
 

My Computer

System One

  • OS
    Windows 11 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    custom
    CPU
    intel i7-8700 (non-K)
    Motherboard
    Asus Z370 TUF Gaming
    Memory
    32Gb
    Graphics Card(s)
    On-board Intel iGPU
    Sound Card
    On-board Realtek
    Hard Drives
    Samsung_SSD_850_EVO
    PSU
    Corsair Rm850X
    Cooling
    All air
Have you tried the Settings in Terminal ?View attachment 45146
this is the setting that eludes me.

This setting is available at PowerShell.

Open your powershell (old version) -> click on the arrow down button -> Settings -> Startup -> Default profile -> choose PowerShell 7.3.0 icon


Thank you!
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
Back
Top Bottom