Adding 3rd-party snapins to PrimalForms

Use this forum to ask questions before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
cartershanklin
Posts: 1
Joined: Mon Aug 03, 2009 1:38 pm

Adding 3rd-party snapins to PrimalForms

Post by cartershanklin » Mon Aug 03, 2009 1:40 pm

From the PrimalForms help:

"If you have 3rd party snapins that you wish to use in your PrimalForms script, you will need to load them in script using Add-PSSnapin. PrimalForms will load the snapin and the cmdlets will be added to the PowerShell panel."

Where do you actually do that?

User avatar
davidc
Posts: 5837
Joined: Thu Aug 18, 2011 4:56 am

Adding 3rd-party snapins to PrimalForms

Post by davidc » Tue Aug 04, 2009 2:52 am

When you added snapin in your script, PrimalForms will automatically detect the snapin and attempt to add it to the Panel.
For example you can add the line in the OnApplicationLoad:


function OnApplicationLoad {
#Note: This function runs before the form is created
#TODO: Add snapins and custom code to validate the application load
Add-PSSnapin ChangeVuePS
return $true #return true for success or false for failure
}

David
SAPIEN Technologies, Inc.