Hello Everyone,
I've used a Powershell script for adding external nodes from a CSV file by rachelh found here and tried to adapt it for adding ICMP nodes. It works, but the nodes never poll. I suspect the problem relates to these:....
$poller["PollerType"]="N.Status.ICMP.Native";
$pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller
....but I don't know how to place these commands in this code:
$OrionServer="192.168.1.100"
$nodeListFile="C:\Users\Brent\Desktop\Thin-AP-List-2022-11-18.csv"
$creds=Get-Credential
$swis=Connect-Swis -Credential $creds -Hostname $OrionServer
ForEach ($ICMPnode in $nodes)
{
$ICMPNodeName=$ICMPnode.nodename
$ICMPIpAddress=$externalnode.ipa
Write-Host "Creating node:"$ICMPNodeName
# add the external node
$newNodeProps = @{Caption = $ICMPNodeName;Vendor="Aruba";IPAddress = $ICMPIpAddress;EngineID = 1;ObjectSubType = "ICMP";External=$FALSE;}
$newNodeUri = New-SwisObject $swis -EntityType "Orion.Nodes" -Properties $newNodeProps
$newNode = Get-SwisObject $swis -Uri $newNodeUri
}
Any help with be appreciated. Cheers! Brent