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