Page 1 of 1

Incorporating PS Script into Primal Forms

Posted: Mon Nov 07, 2011 7:04 am
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.

Incorporating PS Script into Primal Forms

Posted: Mon Nov 07, 2011 10:48 am
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




Incorporating PS Script into Primal Forms

Posted: Tue Nov 08, 2011 4:10 am
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.