Incorporating PS Script into Primal Forms

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 4 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
R1Johnny
Posts: 37
Last visit: Mon Dec 12, 2022 7:15 am

Incorporating PS Script into Primal Forms

Post by R1Johnny »

Good afternoon,I have a script that I wrote last year in PS 2 which creates users in AD.It takes care of group memberships, mailbox creation, all MS Lync attributes, Unified messaging, etc. I wrote this before attaining Primal Forms. I've now written a much nicer frontend with PF and I'd like to import my script into the PF version.Can you please explain the proper method for doing this?Thank you.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Incorporating PS Script into Primal Forms

Post by davidc »



I don't know what the script consists of, so I will provider a few possibilities:



1. If
you have a script that contains functions, you could create a Project. Add both
the ps1 script and the form to the project and then you can call the script
file from the Form or reference the functions.



2. You
could use good old copy & paste to add the old script to the form. This way you can
alter the script so it interacts directly with the form.



3. You can dot source the script file from the Form, but I
still recommend adding it to a project so it will includes the file.

."Scriptfile.ps1"

4. If the script contains an old GUI interface there is no automatic
way convert the script. You will have to
manually copy & paste the scripts sections and place them in the new form.

I hope this gives you a better idea of your options



David



David
SAPIEN Technologies, Inc.
User avatar
R1Johnny
Posts: 37
Last visit: Mon Dec 12, 2022 7:15 am

Incorporating PS Script into Primal Forms

Post by R1Johnny »

Hi Dave,Going with your suggestion for option #2.My mistake was thinking I could run the combined PS in PF.Oops.This is working now in native PS.Thanks very much for your help with this.
This topic is 12 years and 4 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.