PowerShell 7 User Tool Configuration

PowerShell 7 User Tool Configuration

3

    Aug 02, 2023#1

    I love, love, love the PowerShell terminal integration in UE. In my case, the integration is running PowerShell 5.x. This works flawlessly and will cover most of my needs.

    If you absolutely need or want to use PowerShell 7's new features, or are a stubborn old mule like myself, I was able to get PS7 running in user tools:

    Command tab:
    Menu item name: PowerShell 7
    Command line: pwsh.exe -noexit "%f"
    Working directory: %P

    Options tab:
    DOS program: checked
    Save active file: checked
    Save all files first: unchecked

    Output tab:
    Show DOS box: checked
    Capture output: checked
    No replace: selected
    Handle output as: ANSI

    I hope this helps someone other than myself :D

    Thanks!

    David Miller
    PeopleSoft Administrator
    Information Technology
    UF Health Gainesville

    [email protected]

    3
    NewbieNewbie
    3

      Sep 21, 2023#2

      Not sure how to enable PowerShell in UE?
      I have the button under the 'Coding' tab, 'Scripts' section, but it's dithered, so I can't select it.

      3

        Sep 21, 2023#3

        I see what you are referring to. Created a new file looked under Scripts and powershell was disabled.

        I saved the new file as test.ps1 - still empty file. Powershell was enabled in Scripts.

        6,686586
        Grand MasterGrand Master
        6,686586

          Sep 21, 2023#4

          There was just two hours ago the webinar Power Up with PowerShell: Exploring the new integrated terminal in UltraEdit 2023.0 which you obviously missed.

          You can click at any time on ribbon tab Layout on item Terminal opening the PowerShell Terminal. In that window can be typed PowerShell commands (cmdlets) to execute on pressing key RETURN or ENTER exactly as in a PowerShell console window. There can be also executed (with PowerShell) cmd to start the Windows Command Processor and use the Terminal window now as command prompt window until executing the cmd internal command exit. There can be also executed bash in the Terminal window on having Windows Subsystem for Linux installed and use the Terminal window as bash terminal until executing the bash internal command exit. It is also possible to establish a SSH connection to another device by executing ssh and use the Terminal window now has SSH terminal until executing the command exit to disconnect and terminate ssh. All that and much more was shown in the webinar.

          There is on ribbon tab Coding in group Scripts in UltraEdit for Windows v2023.x also the PowerShell command with a pop-up menu with the two commands Run script and Run selection. This item is enabled if the active file is syntax highlighted with the PowerShell syntax highlighting or the active file has the file extension .ps1 or .psd1 or .psm1.

          Simply open a PowerShell script file with one of the three file extensions and the item PowerShell is enabled for this file.

          Click in the status bar at bottom of UltraEdit/UEStudio main application window on the syntax highlighting language selector list item (on using default status bar and not the basic status bar) and select the language PowerShell on having opened a new, unnamed file. The PowerShell item becomes enabled whereby the usage of the command Run script on active file being a new, unnamed file opens first the Save as dialog window to save the file now before executing the script. A new, unnamed file must be of coursed saved as otherwise PowerShell cannot process the script file.

          The command Run selection is enabled on having something selected in the active PowerShell script file.

          Everything described here was demonstrated during the webinar.
          Best regards from an UC/UE/UES for Windows user from Austria

          3

            Sep 21, 2023#5

            much appreciated. For the most part I use the integrated PowerShell with no issues whatsoever.

            Every now and then I will get adventurous and try the new features in PS v7. About 1/2 hour later I remember that I am old and go back to the integrated version 

            My Parkinson's makes life difficult most days. "Stay in my lane" is always a good safe choice!