Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

How to know the nodes that are not present in solarwinds

$
0
0

Hi

 

Am using the below script to unmanage the nodes. but the problem is if i give a node that is not in solarwinds its trying to unmanage instead of mentioning the node is not in solarwinds. Can some one help me to get the details of nodes that is not in solarwinds  and to unmanage other nodes from the given excel file

 

Add-Pssnapin swissnapin

$swis = Connect-Swis -Hostname orion -Username admin -Password supersecret

$captions = Get-Content .\nodes-to-unmanage.txt

$nodes = Get-SwisData $swis "SELECT Uri FROM Orion.Nodes WHERE Caption IN @captions AND Unmanaged=0" @{captions=$captions}

$nodes | Set-SwisObject $swis -Properties @{UnmanageFrom=[DateTime]::UtcNow;UnmanageUntil=[DateTime]::UtcHours}


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>