Public/Remove-SilkSDP.ps1
function Remove-SilkSDP { param( [Parameter()] [switch] $nodeAddress ) if (!$nodeAddress) { $nodeAddress = Select-SilkSDP -message "Please select the correct node address to remote entirely." -force } $allsessions = Get-SilkSessions | Where-Object {$_.'Silk IQN' -eq $nodeaddress} if ($allsessions) { foreach ($i in $allsessions) { Disconnect-SilkCNode -cnodeIP $i.'CNode IP' } } else { $return = "No target with $nodeaddress discovered." return $return | Write-Error } $return = Get-SilkSessions return $return } |