NetHelpDesk can run PowerShell scripts based on certain events. Parameters specified within the PowerShell script can be mapped to NetHelpDesk fields and the values of these fields passed into the script when run.
In order to use this feature and for this guide to be relevant, the following criteria will need to be met:
Here are a few terms which are commonly used in this guide and in the application: • Script – Refers to a PowerShell script. The script is not stored within the NetHelpDesk database. Instead, a record is made in the NetHelpDesk database which stores the location of a pre-written PowerShell script.
From the NetHelpDesk windows client go to N > Setup > Main Configuration, and select Integrations from the Configuration menu.
From the Integrations menu, click on PowerShell.
The PowerShell settings screen will now be displayed. From this screen, you can enable the PowerShell Integration, or Create Scripts.
To create new scripts, click the ‘Create Scripts’ button on the PowerShell setup screen. From this screen, you can configure as many scripts as you would like in NetHelpDesk.
Click the add button to create a new script.
Any script which has a type of ‘Action’ can be configured to be executed as part of a standard action within NetHelpDesk. To configure this, go to N > Setup > Main Configuration > Actions. Either edit or create a new action, and set the system use to ‘Execute PowerShell Script’.
This gives you the option to select a script as highlighted above. Now, whenever this action is completed, NetHelpDesk will execute the PowerShell script for you during the next NHServer scan.
Any script which has a type of ‘Approval’ can be configured to be executed whenever a specific step of an Approval process is completed. To configure this, go to N > Setup > Main Configuration > Change Management > Approval Processes (Setup Processes).
Either use a pre-determined approval process or create a new process. You will then need to edit/add a step. At the bottom of this edit screen, you can select a script to be executed when this step of the approval is accepted.
The PowerShell scripts are run on the application server as part of the NHServer scheduled task. In order for the script to run successfully, the user running the scheduled task must have the relevant execute permissions on the scripts.
To check the result/output of a script, in Windows Explorer, go to %AppData% > NetHelpDesk > ClientLog > PowerShellScript.txt.
NetHelpDesk is available on a range of devices with industry-leading functionality available throughout.