Skip to content

Commit

Permalink
Fix of wrong parameters in NTA example (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
radek-necas2-sw authored and Víťa Tauer committed Oct 15, 2019
1 parent c8dc52f commit caaf46f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Samples/PowerShell/NTA.EnableDisableFlowSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $nodeCaption = "My test router"
$nodeId = Get-SwisData -SwisConnection $swis -Query "SELECT NodeID FROM Orion.Nodes WHERE Caption = @nodeCaption" -Parameters @{nodeCaption = $nodeCaption}
$flowSourcesIds = Get-SwisData -SwisConnection $swis -Query "SELECT NetflowSourceID FROM Orion.Netflow.Source WHERE NodeID = @nodeID" -Parameters @{nodeID = $nodeId}
$flowSourcesIds = $flowSourcesIds | ForEach-Object {[int]$_}
Invoke-SwisVerb -SwisConnection $swis -Query Orion.Netflow.Source DisableFlowSources @(,$flowSourcesIds) | Out-Null
Invoke-SwisVerb -SwisConnection $swis -EntityName Orion.Netflow.Source -Verb DisableFlowSources -Arguments @(,$flowSourcesIds) | Out-Null
$disableflowSourcesIds = Get-SwisData -SwisConnection $swis -Query "SELECT NetflowSourceID FROM Orion.Netflow.Source WHERE NodeID = @nodeID and Enabled = false" -Parameters @{nodeID = $nodeId}
Write-Host "Disabled $($disableflowSourcesIds.Count) Flow Sources for node with ID $nodeId. Total interface count $($flowSourcesIds.Count)"

Expand Down

0 comments on commit caaf46f

Please sign in to comment.