Skip to main content

Writing a PSLang script

PSLang scripts are broken down into functions. Each function must include a name, function parameters (if applicable), and a sequence of statements to execute:

 function <FunctionName>( <p1>, <p2>, … )

   {

   <statement>

   <statement>

   …

   }

The scripts can contain a mix of user-defined functions and built-in functions which are used to pass information to the agent.

Warning

Remember to remove all debugging statements and to review all statements that will create logs before using the script in a production environment. Ensure that no sensitive information is being captured in the logs.