This is a blast from the past. PowerGUI 3.8 was released in 2013. I worked for Quest at the time PowerGUI was in its prime and have some fond memories as it. PowerShell Tools for Visual Studio even started out as PowerGUI VSX. I decided to give it a go to see if I could run Windows PowerShell 5.1 and PowerShell 7 in PowerGUI. Let’s just say, success.
Running PowerShell 7 inside PowerGUI is actually not possible. PowerShell 7 runs on .NET core while PowerGUI seems to be built on .NET Framework 2.0ish. That said, you can create a local pwsh.exe process and use named pipe remoting to accomplish the debugging. This is similar to the technique for running PowerShell 7 in the Windows PowerShell ISE.
Installing PowerGUI on Modern Operating Systems
First, you won’t find this MSI on the Quest website anywhere. I downloaded this from the somewhat sketchy Softpedia. Once you download it, you’ll need to make a couple of registry tweaks to allow the installer to complete. This is because PowerGUI is trying to ensure the Windows PowerShell 2.0 is installed. I bet if you installed the Windows PowerShell 2.0 Windows Feature, you wouldn’t have to do this. I decided not to do that. Here are the keys I added.
New-Item HKLM:\SOFTWARE\Microsoft\Powershell\1\PowerShellEngine New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Powershell\1\PowerShellEngine -Name 'PowerShellVersion' -Value '5.1'