powershell core 6.x

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
jsira2003@yahoo.com
Posts: 117
Last visit: Tue Jul 11, 2023 6:18 am

powershell core 6.x

Post by jsira2003@yahoo.com »

I was interest to know about powershell studio in respect to powershell core 6.x. Does the powershell studio support this yet? If not what are the prospects for the future.

thank you,
John
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 11:13 am
Answers: 39
Been upvoted: 30 times

Re: powershell core 6.x

Post by brittneyr »

PowerShell Studio can run or edit PowerShell Core scripts. PowerShell Studio automatically detects preview and release versions of PowerShell Core and displays them in the platform list:
SPS-Platform.png
SPS-Platform.png (56.93 KiB) Viewed 4257 times
In regards to the embedded consoles, if you install a new version of PowerShell Core, you will need to reset your consoles to see the new version in the console panel:
SPS-ResetConsole.png
SPS-ResetConsole.png (36.88 KiB) Viewed 4257 times
Debugging and caching are not available at this time. It is important to note that WinForms is not supported in PowerShell Core.
Brittney
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: powershell core 6.x

Post by jvierra »

PowerShell 7 Preview based on Net Core 3.0 does have direct support for WinForms. The preview is fairly complete with some missing items when using WinForms code. It appears that it will become the Microsoft replacement for PowerShell 5.1 and will move Windows PowerShell into the public domain.

See: https://devblogs.microsoft.com/powershe ... -road-map/
User avatar
jsira2003@yahoo.com
Posts: 117
Last visit: Tue Jul 11, 2023 6:18 am

Re: powershell core 6.x

Post by jsira2003@yahoo.com »

I appreciate your reply and illustration. Based on your last statement regarding windows forms, that sounds like I lose my ability create forms in powershell studio. I need to be able to create a mousable gui. What will replace the functionally of windows forms? Or will powershell studio going forward only be a gui-less command-line script/application builder?

thank you,
John
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: powershell core 6.x

Post by jvierra »

I just ran PS 7 in PowerShell Studio with a simple PSF. It works and builds and runs with PS 7. There is a deficiency in Net Core 3.0 which will be fixed before release. All assignments of strings to "point" types fails because Net Core 3 has not been completed. There are a few modules that are missing that allow this to work.

This construct:

$label1.Size = '85, 65'

fails. When the PS 7 is released this should be fixed. If there is some technical reason that this capability won't be ported then Sapien will likely update the code generator to use the "int" array constructor directly.

There are also likely to be more things that will have to be fixed in Core or addressed by Sapien. I am sure the release version will take a bit of time as it is comprehensive and is the replacement for PowerShell 5.1 on Windows.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: powershell core 6.x

Post by jvierra »

Here is the posted bug report addressing this issue with PowerShell 7. The issue is in Net Core System.Drawing.

See: https://github.com/PowerShell/PowerShel ... -500171016

The issue will likely be resolved before PS7 is released.
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked