New Member
Posts: 12
Registered: ‎01-26-2018
Kudos: 2

How to send a shutdown command to switches and cloudkey gen 1 from script?

Hello,

 

I recently setup a new UPS with programmable PDU for my companies server rack, and I'm now in the process of writing the few scripts I need to write to tell certain devices to shutdown safely when a power outtage occurs (2-3 times per year at our location).

 

Obviously the CloudKey is one of these devices (mainly to prevent Mongo DB corruptions), and I would like to do the same thing for the two PoE switches that I am running as well.

 

The main reason for the switches is because while installing the PDU, a mistake was made and power cycled the entire rack of devices. When things came back up, the switch (US-48-500W) seemed to have lost some of its port configuration (port name, and profile).

 

Does anybody know if a way to script both CK (gen 1) and Switches to shutdown safely?

SuperUser
Posts: 16,789
Registered: ‎06-18-2010
Kudos: 5396
Solutions: 1792

Re: How to send a shutdown command to switches and cloudkey gen 1 from script?

[ Edited ]

plink -pw yourpw ubnt@192.168.1.5 shutdown now

Sends 'shutdown now' to the CLI for the device at 192.168.1.5, with username 'ubnt' and password 'yourpw'

plink is one of the putty tools.

Just tried this on my gen1 CK at 192.168.1.5. Works.

 

If you re-provision your switches, any lost settings should come back. Config, Manage Device, Force Provision

Set a Frequency! Don't leave it on Auto!
Disable Uplink Connectivity Monitor
Always set-inform a Second time after Adopting