powershell core 6.x

Ask your Windows 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.
Locked
User avatar
jsira2003@yahoo.com
Posts: 112
Joined: Fri Apr 07, 2017 9:47 am

powershell core 6.x

Post by jsira2003@yahoo.com » Tue Jun 04, 2019 1:43 pm

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: 234
Joined: Thu Jun 01, 2017 7:20 am

Re: powershell core 6.x

Post by brittneyr » Tue Jun 04, 2019 2:33 pm

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 2230 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 2230 times
Debugging and caching are not available at this time. It is important to note that WinForms is not supported in PowerShell Core.
Brittney Ryn
SAPIEN Technologies, Inc.

jvierra
Posts: 13992
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: powershell core 6.x

Post by jvierra » Tue Jun 04, 2019 3:00 pm

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: 112
Joined: Fri Apr 07, 2017 9:47 am

Re: powershell core 6.x

Post by jsira2003@yahoo.com » Wed Jun 05, 2019 6:22 am

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: 13992
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: powershell core 6.x

Post by jvierra » Wed Jun 05, 2019 7:11 am

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: 13992
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: powershell core 6.x

Post by jvierra » Sat Jun 08, 2019 8:36 pm

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.

Locked