Script Template

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 5 years and 10 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
PsCustomObject-2
Posts: 16
Last visit: Tue Oct 30, 2018 8:04 am

Script Template

Post by PsCustomObject-2 »

Product, version and build: 2018 2.5.151
32 or 64 bit version of product:64
Operating system: Win 10 1709
32 or 64 bit OS: x64

*** Please add details and screenshots as needed below. ***

Hello,

not sure I'm trying to abuse a function or something is amiss, I?m trying to create a new PowerShell script template containing couple of custom functions I use almost daily and other stuff making up the standard "boilerplate".

Issue is When I save the new template it retains the custom function, the import module "section" but all remaining code (namely standard variables) are not part of the template.

Is this a by design behavior? Just for info these variables are already assgined values in the service template and indeed visible in the template file so that's no the issue :)

Thanks in advance for any feedback!
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: Script Template

Post by Olga_B »

If you can, please zip and load the original file and template to

https://www.sapien.com/support/upload
User avatar
PsCustomObject-2
Posts: 16
Last visit: Tue Oct 30, 2018 8:04 am

Re: Script Template

Post by PsCustomObject-2 »

Thanks Olga I've just uploaded the file.
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: Script Template

Post by Olga_B »

HI,
I can't reproduce issue here. I created template from your script, and then created new file. Everything works fine.
How did you create template? Did you use File/Create Template menu? Where did you save template?
Could you provide steps.
User avatar
PsCustomObject-2
Posts: 16
Last visit: Tue Oct 30, 2018 8:04 am

Re: Script Template

Post by PsCustomObject-2 »

Olga,

I've been able to find the issue and is not related to PSS, we're using Onedrive folder redirection and junction points screwed up the path where I stored the template.

I can confirm all is working as intended, sorry for creating havoc for nothing :)
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: Script Template

Post by Olga_B »

No problem. Glad you solved the problem.
This topic is 5 years and 10 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.