The third command type with the MS PowerShell Sensor is the "Custom Script".
With that type you can trigger your OWN cmdlet.

You need to place your own cmdlets to the following path:



The following example is a MS SQL example which demonstrates what steps you have to follow.



Make sure that you have all Requirements in place

Requirements / Authentication Profile / Server

Create/adjust your Powershell Script

First of all you need to adjust your script in a way that it follows the following requirements:

Custom Scripts - Guideline


example script for this kbase article:

function Get-ISqlAvailableServers{
        Get available SQL Server instances

        Server names


begin {
process {
    try {
        Write-Verbose "Enumerating servers...please wait"
        # Enumerate servers
        $smoApp = [Microsoft.SqlServer.Management.Smo.SmoApplication]
        $enumServers = $smoApp::EnumAvailableSqlServers($false) | Select Name
        Write-Output $enumServers
    catch [Exception] {
        Write-Error $Error[0]
        $err = $_.Exception
        while ( $err.InnerException ) {
            $err = $err.InnerException
            Write-Output $err.Message




Store Script on GL Appliance

copy your script to : /opt/panagenda/scripts/gl_powershell/Get-ISqlAvailableServers.ps1


Configure the MS Powershell Sensor

  • Script Type:  Custom Script
  • Command Type: Powershell
  • Script Filename: Get-ISqlAvailableServers    (you need to enter the name manually without adding the PS1 extension!)