This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Invoke-SwisVerb : ', hexadecimal value 0x08, is an invalid character.

we are user shell-script to list all the interfaces per node. every thing's work well except for the specific node ID please see error below Invoke-SwisVerb : ', hexadecimal value 0x08, is an invalid character. At C:\Users\solarwinds\Desktop\list_interfaces_pernode.ps1:5 char:15 + ... iscovered = Invoke-SwisVerb $swis Orion.NPM.Interfaces DiscoverInterf ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Invoke-SwisVerb], FaultException`1 + FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb
  • Can you provide the script you are using?

  • Good Day. below is the script that i am currently using

    Param($valuenumber)
    Add-PSSnapin SwisSnapin
    $swis = Connect-Swis -Hostname ******* -Username admin -Password ********

    $discovered = Invoke-SwisVerb $swis Orion.NPM.Interfaces DiscoverInterfacesOnNode $valuenumber

    if ($discovered.Result -ne 'Succeed') {
    Write-Host 'Interface discovery failed, No Data Found!!!.'
    }
    else {
    #$sample=""
    $select="<select class='interface_node' name='interface_node'>"
    $counter = $discovered.DiscoveredInterfaces.Size
    $counter = [int]$counter
    for($x=0;$x -le $counter;$x++)
    {

    $interface = $discovered.DiscoveredInterfaces.DiscoveredLiteInterface[$x].Caption.InnerText
    # $sample+=$interface+";"
    $select+="<option value='"+$interface+"'>"+$interface+"</option>"
    }
    $select=$select+"</select>"
    #Write-Output $sample
    }

    Write-Output $select | add-content C:\Users\Administrator\Desktop\list_of_interfaces.txt

  • Good Day

    please see below script that i am currently using

    Param($valuenumber)
    Add-PSSnapin SwisSnapin
    $swis = Connect-Swis -Hostname ****** -Username admin -Password *******

    $discovered = Invoke-SwisVerb $swis Orion.NPM.Interfaces DiscoverInterfacesOnNode $valuenumber

    if ($discovered.Result -ne 'Succeed') {
    Write-Host 'Interface discovery failed, No Data Found!!!.'
    }
    else {
    #$sample=""
    $select="<select class='interface_node' name='interface_node'>"
    $counter = $discovered.DiscoveredInterfaces.Size
    $counter = [int]$counter
    for($x=0;$x -le $counter;$x++)
    {

    $interface = $discovered.DiscoveredInterfaces.DiscoveredLiteInterface[$x].Caption.InnerText
    # $sample+=$interface+";"
    $select+="<option value='"+$interface+"'>"+$interface+"</option>"
    }
    $select=$select+"</select>"
    #Write-Output $sample
    }

    Write-Output $select | add-content C:\Users\Administrator\Desktop\list_of_interfaces.txt

  • I have tested this in my lab and could not reproduce. As the error is specific to a single node can you provide the captions of the interfaces for the affected node as you would expect to see them?

  • Good Day

          Would it be possible to have your EMAIL so than i can send all the captions per interface privately

    Thanks

  • Good Day

          Would it be possible to have your EMAIL so than i can send all the captions per interface privately

    Thanks