Greetings,
PowerShell Studio 2018 v5.5.148
On Windows 2012 R2.
First of very new to PowerShell Studio but its helping allot already.
I would like to include the powercli modules in a project build that i can give to our desktop support to create a VM based on some preconfigured options. I would like not have to install Powercli on the target machine.
From what i read so far was to check the box under cache , and rebuild cache. I did this and confirmed that the PowerCLI modules were selected. I must be missing a step to include the modules or i don't understand if you can include PowerShell modules in the exe build so I dont have to have them installed on the target machine.
Please help
Thank you
Dana
Include Powershell Modules
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: Include Powershell Modules
[TOPIC MOVED TO THE POWERSHELL STUDIO PRODUCT SUPPORT FORUM BY MODERATOR]
Note: The module cache is used for PrimalSense and syntax coloring only. It has no bearing on the packager.
PowerShell Studio packager does not embed modules into the executable. Including third party modules into the executable could result in issues, especially if the module has external dependencies (such as binary assemblies).
In addition, embedding and extracting files in an executable is frowned upon by Microsoft and they recommend using MSI installers.
Here are some alternatives:
- If the module is up on the PSGallery, I would recommend adding code to your script that will allow users to download the necessary module(s).
- If you know it is a standalone module (and you have permission to redistribute it), you can try creating an MSI installer for your executable and include the module in a sub-folder. Then have your script reference the module from the sub-folder or move it into a PSModulePath location if the module isn't already installed.
Note: The module cache is used for PrimalSense and syntax coloring only. It has no bearing on the packager.
PowerShell Studio packager does not embed modules into the executable. Including third party modules into the executable could result in issues, especially if the module has external dependencies (such as binary assemblies).
In addition, embedding and extracting files in an executable is frowned upon by Microsoft and they recommend using MSI installers.
Here are some alternatives:
- If the module is up on the PSGallery, I would recommend adding code to your script that will allow users to download the necessary module(s).
- If you know it is a standalone module (and you have permission to redistribute it), you can try creating an MSI installer for your executable and include the module in a sub-folder. Then have your script reference the module from the sub-folder or move it into a PSModulePath location if the module isn't already installed.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- danarstevenson
- Posts: 8
- Last visit: Wed Mar 20, 2024 5:41 am