How do you run a Library Script using PowerShell?

How do you run a Library Script using PowerShell?

I can't find it in the docs or help file.  I did see mention of it on only one post.

I think what I saw was something like:

#--- include script library ---
$context.UseLibraryScript('Script Modules/Library/Workflow Functions')

 

If you do know where the docs that go over this I would appreciate it. 

Parents
  • Are you familiar with the Active Roles SDK CHM help file? There should be an SDK folder wherever Active Roles is installed. The CHM file has a lot information and sample code. Within the help file, if you select the Search tab and type in 'Library Script' you should see a section titled 'Understand Library Scripts'.

    Within Active Roles, create and save the library script which contains the functions you would like to utilize in other Policy Scripts. You will then add the following code at the top of the Policy Script replacing "MyLibraryScript" with the name of your library script. This will allow you to simply call the function names that are in the library script from the policy script.

    function onInit($context)
    {
       $context.UseLibraryScript("MyLibraryScript")
    }

Reply
  • Are you familiar with the Active Roles SDK CHM help file? There should be an SDK folder wherever Active Roles is installed. The CHM file has a lot information and sample code. Within the help file, if you select the Search tab and type in 'Library Script' you should see a section titled 'Understand Library Scripts'.

    Within Active Roles, create and save the library script which contains the functions you would like to utilize in other Policy Scripts. You will then add the following code at the top of the Policy Script replacing "MyLibraryScript" with the name of your library script. This will allow you to simply call the function names that are in the library script from the policy script.

    function onInit($context)
    {
       $context.UseLibraryScript("MyLibraryScript")
    }

Children