Advantage to using projects

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 7 years and 8 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.
User avatar
WSUsoftware
Posts: 30
Last visit: Thu Feb 17, 2022 2:52 pm

Advantage to using projects

Post by WSUsoftware »

Product, version and build: Powershell Studio 2016 version 5.2.124
32 or 64 bit version of product: 64 bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit
PowerShell Version: v5

Sorry for a super simple and possibly dumb question, but I didn't find any great articles explaining it. I'm in the process of converting all of our old "laptop personalization" VB scripts into powershell which we use to add new users to the domain, rename their computer, make their AD account the local admin on that machine, etc... Currently I have two seperate .ps1 files and one .psf form which call each other and just sit in a network folder. I noticed that there is an option to create a project and to put files and forms into it. Is there any specific advantage to using a project over just haveing the couple of files sitting in the same network folder and call each other? Sorry if this is a dumb question, but I'm the first one at my company to use powershell for this purpose or to even think about using projects. Nobody here has used them before.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Advantage to using projects

Post by davidc »

Projects can provide the following benefits:

1. Organization: Easily access files relevant to the project in the Project panel.
2. Project based PrimalSense. When using a project, PowerShell Studio can load files and provide PrimalSense across files (depending on Build settings).
3. Create installers with multiple files, Deploy files as a whole vs individual files.
4. “Build” the files into a single script for Packaging. Each file is reference by a Call-function:
https://www.sapien.com/blog/2013/10/01/ ... ing-forms/
5. There is a Collection Project that allows you to group individual scripts together and deploy them as a whole.
https://www.sapien.com/blog/2015/05/06/ ... t-options/

But it really depends on what you are working on.
- For example, if you plan to create a script with multiple GUI interfaces, then you will want to use a project.
- If you plan to create a module, you should use a project.

It also depends on your personal preferences. If you don’t like projects, you can use a filegroup which open all the files at once:

https://www.youtube.com/watch?v=YaFb2gbPSWQ
David
SAPIEN Technologies, Inc.
This topic is 7 years and 8 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.