I there a way to force Windows to use PS 7 instead of the old 5?


IFEO is a Window debugging function for devs, which is often abused by hackers. When any app is launched by Windows, it first consults the registry for existing IFEO entries matching that filename, before determining if it will run that app, or another one in its place.
 

My Computer

System One

  • OS
    Windows 7

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    LG Gram 17Z90Q
    CPU
    12th Gen Intel(R) Core(TM) i7-1260P, 2100 Mhz
    Memory
    16GB LPDDR5 SDRAM
    Graphics Card(s)
    Intel(R) Iris(R) Xe
    Hard Drives
    Crucial T500 1TB + 2TB
    Mouse
    Logitech MX Master 3S
    Internet Speed
    Cable, 1000Mbit/s
Post #5 was the reg files...
The scissor dangerous drastic solution?
I was still waiting for you to explain what does it do exactly. Maybe you didn't notice where I asked you that?
In the post after that I had asked: Can you explain what those scissor codes there do exactly? So I can choose if running with scissors or with wolves.

But now I was referring to the per-script, not drastic solution of your Post #14.
I replied to it in Post #18 with a screenshot of a popup error I get when I do what you said.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    LG Gram 17Z90Q
    CPU
    12th Gen Intel(R) Core(TM) i7-1260P, 2100 Mhz
    Memory
    16GB LPDDR5 SDRAM
    Graphics Card(s)
    Intel(R) Iris(R) Xe
    Hard Drives
    Crucial T500 1TB + 2TB
    Mouse
    Logitech MX Master 3S
    Internet Speed
    Cable, 1000Mbit/s
Not correct. Most PowerShell scripts will get interpreted by whatever version of PowerShell is the default for running PS1 files. Of course, if the script is run by another process, that process can specify powershell.exe or pwsh.exe but it doesn't have to.

Edit: There isn't a default interpreter for PS1 files. You cannot double-click PS1 files. You have to right-click and "Run with PowerShell" or open a PowerShell window and run the script. However, you could set an Image File Execution option (as noted by @garlin) so that "Run with PowerShell" runs pwsh.exe instead of powershell.exe, but that would not be a good idea.

Since PowerShell.exe existed long before pwsh.exe, changing the default (via IFEO) is guaranteed to be a problem at some point. It could only work correctly if pwsh.exe were 100% backwards compatible with powershell.exe. It definitely is not.
o course there is a way to use for .ps1 the pwsh.exe as default
Method 1: Using Settings (Recommended)
This method allows you to browse and set defaults for all file types from a central location.

  1. Open Settings: Press the Windows key + I to open the Settings app, or click the Start button and select Settings.

  2. Go to Default Apps: Click on Apps in the left-hand panel, then select Default apps.

  3. Search for the File Extension: In the search bar under "Set defaults for applications," type the file extension you want to change (ps1,ps1xml,psc1,psd,psd1,psm1,psc,") and press Enter.

  4. Change the Default App: Click on the current default app listed for that file type. (if not listed browse for it

  5. Select Your App: In the "Choose an app" window, select the program you want to use as the default for that extension. If the app isn't listed, you may need to install it or search the Microsoft Store.

  6. Set as Default: Click Set default to confirm the new association.
  7. so now you set the new PowerShell 7to be the default one ta da
 

My Computer

System One

  • OS
    Windows 11 Enterprise
    Computer type
    Laptop
    Manufacturer/Model
    Dell
    CPU
    11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (1.80 GH
    Motherboard
    dell
    Memory
    16,0 GB (15,7 GB usable) 3733MT/s
    Graphics Card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek audio
    Monitor(s) Displays
    Samsung Odyssey OLED G8/G80SD S32DG80
    Screen Resolution
    3840x2160
    Hard Drives
    SCSI\DiskNVMe_____________________PC_SN730_NVMe_WDC_256GB11170012
    Case
    Laptop
    Keyboard
    built in
    Mouse
    MX Master
    Internet Speed
    500Mb/s
    Browser
    EDGE
    Antivirus
    Windows Defender
While you can do this, it breaks the security norm for PS that it doesn't have a default file type handler. And you're forced to explicitly call a script instead of simply clicking on a .ps1 file in Explorer.

It's a personal choice, but be warned it's less secure as PS was deliberately designed not to be clickable or run without invoking powershell.exe or pwsh.exe by name.
 

My Computer

System One

  • OS
    Windows 7
Hi,

because of other issues which I'm addressing in another thread I've realized that in my System there is Windows Powershell 5.1, and PowerShell (Core?) 7.5.
When I installed PS7 I've used Chris Titus Utility to make it be the default PS, but it doesn't seem to have worked.
When I evoke PS from Win+X by clicking on "Windows PowerShell (Admin)" (or also the non admin) what opens is the older PS, which has a lighter blue icon.
The new PS is triggered by default only in Terminal.

I was told that trying to forcibly uninstall PS5 can mess up the system. I was told that eventually I can try renaming the exe of PS5 so it can't be triggered anymore, but I wonder if that means that nothing would be triggered or that the system would automatically look for PS7.

I wish to reach two things:
1. that every and each single time where the system or some program needs to run PS, they'll evoke PS7 and not PS5. Or at least that they do whenever possible.
2. that all entries about PS in Win+X are about PS7 and not PS5, or at least that both of them are present (if it's not possible to have only PS7).

How do I achieve that?

I've tried removing PS5 in the environment variables, and pushing up PS7. No idea if I did it properly, but it doesn't seem to be having any effect.

Thanx
I just uninstall PowerShell completely, then go download the new version. Works for me
 

My Computers

System One System Two

  • OS
    Windows 11 Pro x64 24H2 v26200.5074
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built Myself in 2025
    CPU
    AMD Ryzen 9 3600X 12-Core @ 3.80GHz
    Motherboard
    MSI X570 Gaming Plus
    Memory
    Corsair 32GB DDR4
    Graphics Card(s)
    EVGA GeForce gtx 1660 Super
    Sound Card
    On Board
    Monitor(s) Displays
    2 X AOC 27" , Dell 27"
    Screen Resolution
    1920 X 1080
    Hard Drives
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~ P34A60 512GB NVMe PCIe Gen3x4 M.2
    ~ 6TB Toshiba HDD
    ~ 6TB HDD (Backup)
    ~ SanDisk 250GB SSD
    ~ 2 X 1TB HDD
    ~~~~~~~~~~
    PSU
    eVGA 750w G+
    Case
    GAMDIAS White ATX Mid Tower Gaming Computer PC Case w/Tempered Glass
    Cooling
    AMD Wraith Prism
    Keyboard
    Nulea RT05 Wireless Ergonomic
    Mouse
    Nulea MD280 Wireless Vertical Mouse
    Internet Speed
    761Mbps (Download) / 692Mbps (Upload)
    Browser
    Firefox
    Antivirus
    Malwarebytes
    Other Info
    *This is my Main Computer That I use*
  • Operating System
    Windows 11 Pro x64 24H2 v26100.2894
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 7 1800X @ 3.60Ghz
    Motherboard
    Asus Crosshair VI Hero
    Memory
    16GB
    Graphics card(s)
    AMD RX580
    Sound Card
    onBoard
    Monitor(s) Displays
    LG 27UK650-W 27", eMachine 22"
    Screen Resolution
    1920 X 1080
    Hard Drives
    250GB SSD
    PSU
    CORSAIR RM850
    Case
    GAMDIAS Black ATX Mid Tower Gaming Computer PC Case w/Tempered Glass
    Cooling
    Liquid
    Keyboard
    Nulea RT05 Wireless Ergonomic
    Mouse
    Nulea MD280 Wireless Vertical Mouse
    Internet Speed
    752Mbps (Download) / 537Mbps (Upload)
    Browser
    Firefox
    Antivirus
    Malwarebytes
    Other Info
    I use this computer for photo/video editing and to track severe weather
While you can do this, it breaks the security norm for PS that it doesn't have a default file type handler. And you're forced to explicitly call a script instead of simply clicking on a .ps1 file in Explorer.

It's a personal choice, but be warned it's less secure as PS was deliberately designed not to be clickable or run without invoking powershell.exe or pwsh.exe by name.
it doesn't break anything i just set PowerShell 7 as default and can just DoubleClick on any .ps1 file it will open pwsh.exe
i even removed the old PowerShell 5.1 /v1 entirely from system after setting the defaults
you can use vivetool you can go to add remove features etc
you can set a terminal profile also
after old can be removed
it is not maintained anyway
it won't brick anything and if you have old. ps1 scripts jus convert them

and another thing latest PowerShell 7 is backwards compatible so even if you done edit the scripts it has a logic to forward to newer apps/ commands
 

My Computer

System One

  • OS
    Windows 11 Enterprise
    Computer type
    Laptop
    Manufacturer/Model
    Dell
    CPU
    11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (1.80 GH
    Motherboard
    dell
    Memory
    16,0 GB (15,7 GB usable) 3733MT/s
    Graphics Card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek audio
    Monitor(s) Displays
    Samsung Odyssey OLED G8/G80SD S32DG80
    Screen Resolution
    3840x2160
    Hard Drives
    SCSI\DiskNVMe_____________________PC_SN730_NVMe_WDC_256GB11170012
    Case
    Laptop
    Keyboard
    built in
    Mouse
    MX Master
    Internet Speed
    500Mb/s
    Browser
    EDGE
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom