Skip to content

Commit

Permalink
Initial commit of node inventory enable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrxinu committed Oct 25, 2019
1 parent caaf46f commit e7ef583
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Samples/PowerShell/Node.Inventory.Enable.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Import-Module SwisPowerShell

$OrionServer = 'localhost'
$Username = 'admin'
$Password = ''

$swis = Connect-Swis -Hostname $OrionServer -Username $Username -Password $Password

$query = "
SELECT TOP 5
Nodes.NodeID
FROM Orion.Nodes AS Nodes
"

$nodeids = Get-SwisData -SwisConnection $swis -Query $query

# details about the reason for the arguments format can be found here:
# https://github.com/solarwinds/OrionSDK/wiki/Alerts#verb-resumealerts
Invoke-SwisVerb -SwisConnection $swis -Entity 'Orion.ADM.NodeInventory' -Verb 'Enable' -Arguments @( , [int[]] $nodeids ) | Out-Null

0 comments on commit e7ef583

Please sign in to comment.