cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Copy a Solarwinds node (Powershell)

DESCRIPTION

The attached Powershell script copies an existing Solarwinds node to one or more new nodes. The script copies the polling method (ICMP, SNMP, Agent) and custom properties from the source node. The script assigns the new node to the polling engine with the smallest load (as measured by the number of monitored nodes).

SYNTAX

copy-solarwinds-node.ps1 [-server solarwinds_server] -sourceNodeIP source_node_IP -targetNodeName target_node1_FQDN target_node2_FQDN... target_nodeN_FQDN

COMMAND LINE PARAMETERS

-server (Optional, default = localhost): The FQDN or IP address of the Solarwinds server. If omitted, defaults to "localhost"

-sourceNodeIP (Required): The IP address of the Solarwinds managed node you want to copy. I've specified that this must be an IP address because my users not infrequently create multiple nodes with the same caption but different IPs for load balancer nodes, cluster members, etc.

-targetNodeName (Required, can specify 1 or more): The FQDN of the node(s) to create. The FQDN must be resolvable by the device where the Python script is running.

-w|--wait (Optional): The number of seconds to pause between creating the target node and populating its custom properties from the source node. If your installation needs time to perform actions when a new node is added, you may need to wait between creating the node and updating any properties on it.

DEPENDENCIES

Powershell snap-in:

SwisSnapin

TCP port 17777 open on your Solarwinds server

EXAMPLES

Example 1

Copy the configuration of the managed server with IP address 10.10.10.100 to create new managed servers server1, server2, and server3

powershell.exe copy-solarwinds-node.ps1 -server solarwinds.mycompany.com -sourceNodeIP 10.10.10.100 -targetNodeName server1.mycompany.com server2.mycompany.com server3.mycompany.com

Example 2

Copy the configuration of the managed server with IP address 10.10.10.100 to create new managed servers server1, but force the script to wait 60 seconds between creating server1 and populating its custom properties. If your installation needs time to perform actions when a new node is added, you may need to wait between creating the node and updating any properties on it.

powershell.exe copy-solarwinds-node.ps1 -server solarwinds.mycompany.com -sourceNodeIP 10.10.10.100 -targetNodeName server1.mycompany.com -wait 60

Attachments
Version history
Revision #:
1 of 1
Last update:
‎08-14-2019 03:24 PM
Updated by: