From e7ef583edd0025ea41ddb4af21947b7c9b15ce21 Mon Sep 17 00:00:00 2001 From: Steven Klassen Date: Fri, 25 Oct 2019 13:37:52 -0700 Subject: [PATCH] Initial commit of node inventory enable --- Samples/PowerShell/Node.Inventory.Enable.ps1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Samples/PowerShell/Node.Inventory.Enable.ps1 diff --git a/Samples/PowerShell/Node.Inventory.Enable.ps1 b/Samples/PowerShell/Node.Inventory.Enable.ps1 new file mode 100644 index 000000000..755b464a6 --- /dev/null +++ b/Samples/PowerShell/Node.Inventory.Enable.ps1 @@ -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