- 5 minutes to read

PowerShell

New 6.0.1.0

Info

Learn how to use your own PowerShell scripts to perform custom monitoring and allow end-users to execute these using self-service enabled Monitor Views.

Execute virtually any PowerShell script
Use for custom Monitoring
Allow end-users to execute scripts as Remote Actions on-demand

graph LR subgraph "fal:fa-rectangle-terminal Nodinite " roNI[fal:fa-monitor-waveform Windows Server Monitoring Agent] --- |Local execution| roSRV1[fal:fa-server Server A] end subgraph "Other network" roNI --- |Remote execution| roSRV2[fal:fa-server Server B] end

Note

You must have WMF 5.1 or later.

This page describes what's being monitored for the PowerShell Category in Nodinite, using one or more role-based Monitor Views. Nodinite monitors the state based on user-defined thresholds, either global or specific. For managing the PowerShell, remote commands are available as Actions. These help you swiftly manage reported problems. The implemented Remote Actions are further detailed on this page.

PowerShell items as Resources
Example with a list of monitored 'PowerShell' resources in a Monitor View

Monitoring Features

  • A Nodinite Administrator must manually manage your PowerShell configurations. Sharing insights is very easy from within Nodinite using Monitor Views.
  • State Evaluation - Based on simple logic (Write-Warning for Warnings, Write-Error for Errors)
  • Category-based monitoring - To help you sort out the different types of resources, the monitored Resources are grouped by Categories

State evaluation for PowerShell based monitoring

The monitored PowerShell configurations are displayed within Nodinite as Resources. For example, if you have 2 Windows Source Server configurations with 2 and 3 PowerShell configurations, you will have 5 'PowerShell' resources in Nodinite.

  • The name of the Resources are the same as the name for the PowerShell-configuration

  • The 'PowerShell' resource belongs to the following Category:

    Category Description
    PowerShell Make sure the PowerShell configurations are within user-defined monitoring thresholds

    Categories
    List of the PowerShell related category as a filter in a Monitor View

  • The Application name is the Display Name from the configuration of the monitored Windows Server:
    Application Path Example

Each item (presents in Nodinite as a Resource) is evaluated with a state. (OK, Warning, Error, Unavailable).

From within Nodinite, you can reconfigure the state evaluation on Resource level using the Expected State feature.

Note

Depending on the user-defined synchronization interval set for the Windows Server Monitoring Agent, there might be a delay before Nodinite Web Client/Monitor Views reflects upon the change. Click the Sync All button (or on the dropdown for individual agent selection) to force Nodinite to request a resynchronization request.

Sync
Option to force Nodinite to request a resynchronization request with the Monitoring Agent.


PowerShell Monitoring

For the PowerShell category, the monitored state evaluates as described in the table below:

State Status Description Actions
Unavailable Service not available If the server can't be reached and evaluated either due to Network or security-related problems Review prerequisites
Error Error state raised The script fails or contains Write-Error in the output Details
Show Action Scripts
Warning Warning state raised The script failed or contains Write-Warning in the output Details
Show Action Scripts
OK Operational The 'PowerShell' configuration is valid, and the script executes without any errors or warnings Details
Show Action Scripts

Remote Actions for PowerShell

The following Remote Actions are available for the PowerShell Category:

Actions

Details

You can view some details for the selected PowerShell resource, click on the Action button and then clicking on the Details menu item within the 'Control Center' section.
Details Menu Action
To open the details modal, click the 'Details' action.

Next, click the option to present the modal.
Details modal
Here's an example of the 'Details' modal.

Show Action Scripts

You can manage the alert thresholds for selected PowerShell resource, click on the Action button and then clicking on the Edit thresholds menu item within the 'Control Center' section.
Show Action Scripts Action
To open the scripts modal, click the 'Show Action Scripts' action.

Next, click the option to present the modal.

Show Action Scripts Modal
Here's an example of the 'Action Scripts' modal.

Click on the Execute button to run the script on demand.
Confirm intent
The user must confirm the intent to execute the script.

The output is presented at the bottom of the modal.
Output
Here's an example of the result from the operation.


Configuration

Use the Remote Configuration to manage the PowerShell configuration.

PowerShell tab

Click the PowerShell tab to manage the PowerShell Monitoring options.
PowerShell tab
Here's an example of the 'PowerShell' tab.

State Example code Description
OK echo "Hello World" Script runs without errors and has no warnings or errors written to the ouput
Warning Write-Warning "Warning for moderate rain" Script runs without errors and has a warning written to the output
Error Write-Error "General failure reading from disk" Script fails or has errors written to the output

click the Add button to add a new entry, ultimately this will be the Resource as seen in Monitor Views.

PowerShell General tab

This is the Monitoring entry.

  • Enabled - When checked, this PowerShell Script is monitored
  • Display Name - The user-friendly name of this resource as provided to end-users within Monitor Views
  • Description - User-friendly description for the PowerShell Script resource
  • PowerShell Script - The script to use for the Monitoring
    PowerShell General tab

User Action Scripts

This entry allows the System Administrator to provide a script collection end-users with allowance to execute content as Remote Actions.
PowerShell User Script Collection tab

click the Add button for each script to include in the script collection.
User script entry

PowerShell Authentication

Set authentication options executing the PowerShell script.
Authentication tab

Check the checkbox to execute the script on another target host.

  • Is remote server - When checked, these PowerShell Scripts run on a remote server
  • Address - The address for the remote server
  • Domain User - The name of the Windows user account. Format: DOMAIN\User
  • Password - The password for the provided domain user

Authentication fields


Next Step

Add or manage Monitor View

Windows Server Monitoring Agent
Resources
Monitoring
Monitor Views