KBI 311991 How To Use Argent To Run Scripts Remotely On 400 Servers

Version

Argent Advanced Technology — All Versions

Date

Friday, 6 May 2022

Summary

This article describes how to remotely run a script on 400 servers.

Technical Background

By using Windows Remote Management (WINRS) Argent Guardian Ultra is be able to execute a script, executable, batch file, or command on servers remotely.

The script must be located locally on the remote server

Argent Guardian Ultra will use the variable %AGNodeName% which is created from Monitoring Group

Source: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/winrs

Resolution

Option One: Script is located on remote server

Argent Guardian Ultra > Windows Rules >System Command Rules

New System Command Rule

Command File: winrs

Optional Parameters: -r:%AGNodeName% c:\scripts\samplescript.cmd optional_parm1

Create Relator using new System Command Rule and add Monitoring Groups to run the script

Option Two: Script is not located on Remote Server

Create command file on Argent Advanced Technology Server

Argent Guardian Ultra > Windows Rules >System Command Rules

New System Command Rule

Command File: C:\scripts\myremote.cmd

Optional Parameters: %AGNodeName% SampleScript.cmd optionalparm1

Create Relator using new System Command Rule and add Monitoring Groups to run the script