This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

POWERSHELL SCRIPT TO UNMANAGE NODE VIA REST API/JSON

I needed this for a side project and i'm placing this script here. It gives a baseline to unmanage a node via PowerShell and SWIS without the need to install the SDK. The baseline can be modified/imported into any current POSH script.


I've used this in automation scripts so that it doesn't alert me on a node while i'm performing an automated task.


Parameters:

NodeID: You can find the NodeID when you browse to that host and look in the URL. I'll be "N:#"

Duration: Time to unmanage node. Examples are provided in script for duration in minutes, hours and days.


2015-11-20_1353.png

SWIS_Rest_API_Unmanage.ps1
  • Im using this as an alert trigger action after a node reboot.  What was happening was we were getting a lot of alerts for service downs after a reboot waiting for them to come back up.  Deployed this script as a trigger action to put the node in maintenance mode for a couple minutes and voila, no more service down alerts!

    Thank you!