• Ensure Powershell 7 is the default

    Home » Forums » AskWoody support » Windows » Windows 11 » Windows 11 version 22H2 » Ensure Powershell 7 is the default

    Author
    Topic
    #2716181

    How can I be certain that any calls to/for PowerShell end up with v7 and not v5.x?

    Chuck Billow

    Viewing 1 reply thread
    Author
    Replies
    • #2716184

      Chuck,

      What kind of calls? The two programs use different names, i.e. PWSH.exe for V7 and PowerShell.exe for V5.

      Unless you enable some additions to File Explorer, double-clicking on a .ps1 file will not run the file but open it in the default editor for .ps1 files, usually Notepad but on my Win 11 machines it’s NotePad++. If you add entries to the Context Menu in File Explorer it will open the version of PS which is setup in the item definition. I have a Run with PowerShell option on my daily driver which opens V5.

      On my Win 10 laptop I have both Run with PowerShell7 and Run with PowerShell selections.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2716217

      RG, I get it.  I suppose running v5 alongside v7 just had me a little concerned that compatibility wouldn’t ever be an issue.

      Chuck Billow

    Viewing 1 reply thread
    Reply To: Ensure Powershell 7 is the default

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: