Using generic PowerShell - GLOBAL-PS-Values templates

On the page

Need some help?

How the plugin works

Normal operation of the plugin is ensured when the output of the PowerShell command has the following structure:

  • a column with the name of the value to be processed
  • a column with the value to be compared to the thresholds

If, in the output of the PowerShell command, there is only the column with the value. the control point will be in UNKNOWN.


PowerShell control

Here we want to calculate how long the file has not been modified.

We check the number of days since the last modification.

  • Command:
((Get-Date)- ((Get-ItemProperty -Path $filePath).LastWriteTime)) | select-object -Property Days
  • Ouput:


The information is not enough. The checkpoint will be in UNKNOWN.
The column with the name of the value is missing.

We'll generate it in the PowerShell output:

  • Command:
((Get-Date)- ((Get-ItemProperty -Path $filePath).LastWriteTime)) | select-object -Property @{Name="$columnName"; Expression = {"$content"}}}, Days
  • For example:
((Get-Date)- ((Get-ItemProperty -Path C:UserskerraesDesktopo365.txt).LastWriteTime)) | select-object -Property @{Name="Name"; Expression = {"AntivirusBaseIsLate"}}}, Days
  • Output :


In the order, the part:

{{Name="Name"; Expression = {"AntivirusBaseIsLate"}}

allows you to create a column with the content "Expression" in the output.

Control Point Configuration

The GLOBAL-PS-Values service model is used.


In the " Name Property " parameter: the name of the column where the name of the value is located. If the control is Warning or Critical, this value will be the plugin output.

In the "Property to control" parameter: the name of the column where the value is located.


This may also be of interest to you

Global-Api-Value & Global-Api-Status

word image 10

Using the Global-Plugin-Execution service template

Configuring a ServiceNav Box to receive traps


Welcome to ServiceNav!

Need help? More information about our products? Write to us!
You have taken note of our privacy policy.


While the epidemic lasts, ensure the availability and performance of your IT services for teleworking, with ServiceNav!

Following the government's call to mobilize to help businesses overcome the current health and economic context, we help you, free of charge, to ensure the complete monitoring of your teleworking environments: VPN, VDI, Teams, Skype Enterprise, Citrix... Objectives: collection, availability and usage indicators, dashboards to support your communication.
We use cookies to ensure that you have the best possible experience on our site, and if you continue to use this site, we will assume that you are satisfied with it.

Reserve your place

You have taken note of our privacy policy.