Script engine missing PS7

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
This topic is 1 year and 1 month 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.
tiza4711
Posts: 3
Last visit: Wed Jan 17, 2024 12:05 am

Script engine missing PS7

Post by tiza4711 »

PowerShell Studio 2023 and PowerShell 7.2.4 installed on Windows 11.
Script Packager used to build EXE. This does work if selecting "Windows PowerShell" - "Microsoft Windows PowerShell (command line)" and an EXE running PS 5.1 is created perfectly.
Now, I must run PowerShell 7 on the target system where PowerShell 7.2.4 is installed. Running the created PowerShell.ps1 script which requires PowerShell 7 does work too.
My problem - if I select "PowerShell 7.2.x" in the Script Packer, it is only showing the different "SAPIEN Powershell7.x ..." versions on the right side. If selecting one them, the EXE is built but also some DLLs ... I do not need the SAPIEN PS 7 DLLs as the host where the EXE will run does have installed PowerShell 7.2.4.

Any ideas what I have to do? So that just an EXE will be created which will run by it's own (without SAPIEN DLLs) on PowerShell 7.
User avatar
Alexander Riedel
Posts: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: Script engine missing PS7

Post by Alexander Riedel »

That is not how PowerShell 7 and the underlying framework works.
All these DLLs and associated files are not generated for fun, they are required.
Here is an article from a while ago that explains things in more detail:
https://www.sapien.com/blog/2020/08/12/ ... -net-core/
Alexander Riedel
SAPIEN Technologies, Inc.
tiza4711
Posts: 3
Last visit: Wed Jan 17, 2024 12:05 am

Re: Script engine missing PS7

Post by tiza4711 »

Many thanks for the quick response.
I'm new to packaging PS into EXE and didn't know the PS7 and .Net core before.
This topic is 1 year and 1 month 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.