RE:Powershell Core Console wont execute
Post by coryjiggens » Fri May 15, 2020 3:47 pm
To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product: PowerShell Studio 2020 (64 Bit)
Build: v5.7.182
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19041.0
Powershell 7.1.0-rc-2
*** Please add details and screenshots as needed below. ***
If I run a script in PowershellStudio with or without a Winform construct no errors are returned but the script closes without running the code. No form is presented or results returned to the output screen (Tested using write-host.)
If a script is run in the console the error attached is returned.
If the surrounding ' "mj." ' and ' '' mj' are edited out of the command string, the scrip will act as expected.
If the script is exported to a file and then ran the script acts as expected
PowerShell 5.1 appears to be unaffected
Powershell v7.1 Code will not run
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Powershell v7.1 Code will not run
Please try resetting your consoles in Options:
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Powershell v7.1 Code will not run
The test script is 'write-host "Hello World"'
Using the command string below. PowerShell fails to load the shell
'D:\Program Files\PowerShell\7-preview\pwsh.exe -noexit Remove-Module PSReadline -ErrorAction Ignore'
'D:\Program Files\PowerShell\7-preview\pwsh.exe -noexit' Will load the shell but does not remove the 'mj' header / footer from the command string in the console.
Running the script returns the following in the Output panel.
Run Run Selected
Using the command string below. PowerShell fails to load the shell
'D:\Program Files\PowerShell\7-preview\pwsh.exe -noexit Remove-Module PSReadline -ErrorAction Ignore'
'D:\Program Files\PowerShell\7-preview\pwsh.exe -noexit' Will load the shell but does not remove the 'mj' header / footer from the command string in the console.
Running the script returns the following in the Output panel.
Run Run Selected
- Attachments
-
- Powershellv7Output-Postmodification.png (20.88 KiB) Viewed 2213 times
-
- V7Oustput-Selected.png (61.36 KiB) Viewed 2213 times
Re: Powershell v7.1 Code will not run
PowerShell 7.1 is not currently fully supported as we do not generally support preview versions. We do allow you to make a console with preview versions and run scripts through the Console panel, but you should not be able to run directly though PowerShell Studio and see results in the Output panel. There was a bug reported by another customer about this behavior not working as expected. We have filed a bug report for that and it should be fixed in the next service release.
When you have V7 selected from the ribbon, it is running the latest stable version of PowerShell 7.0.3: Please verify the you have PowerShell 7.0.3 installed. You should be able to have a preview 7.1 release and 7.0.3 installed side-by-side.
When you have V7 selected from the ribbon, it is running the latest stable version of PowerShell 7.0.3: Please verify the you have PowerShell 7.0.3 installed. You should be able to have a preview 7.1 release and 7.0.3 installed side-by-side.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Powershell v7.1 Code will not run
Support for PowerShell 7.1 has been added to service release 5.8.183.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Powershell v7.1 Code will not run
Thank you for the update
Installed latest version of Powershell Studio.
I am still having each line of text in the editor inserted between ' mj' ('<space>mj') when using <F8> to run the whole or selected parts of the script . I also have Primal Script 2021 installed on the same computer. Primal Script works as expected with Powershell 7.
Product: PowerShell Studio 2021 (64 Bit)
Build: v5.8.183
OS: Windows 10 Pro (64 Bit)
Build: v10.0.19041.0
Name : ConsoleHost
Version : 7.1.0
InstanceId : 4ba7730b-3f0c-4074-ac01-7f78aae66923
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Installed latest version of Powershell Studio.
I am still having each line of text in the editor inserted between ' mj' ('<space>mj') when using <F8> to run the whole or selected parts of the script . I also have Primal Script 2021 installed on the same computer. Primal Script works as expected with Powershell 7.
Product: PowerShell Studio 2021 (64 Bit)
Build: v5.8.183
OS: Windows 10 Pro (64 Bit)
Build: v10.0.19041.0
Name : ConsoleHost
Version : 7.1.0
InstanceId : 4ba7730b-3f0c-4074-ac01-7f78aae66923
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace