3 Replies Latest reply on Apr 26, 2017 5:42 AM by ioan_bucsa

    Update SNMP Community string using PowerShell

    ioan_bucsa

      So I'm trying to write a PowerShell script to update the community script for certain nodes and I get an odd error:

       

      Set-SwisObject : Invalid column name 'SNMPV3Username'.

      Invalid column name 'SNMPV3PrivMethod'.

      Invalid column name 'SNMPV3PrivKey'.

      Invalid column name 'SNMPV3AuthMethod'.

      Invalid column name 'SNMPV3AuthKey'.

      At D:\Scripts\Vertiv_Scrub.ps1:43 char:1

      + Set-SwisObject $SWIS -Uri $URI -Properties @{Community = 'Test'}

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          + CategoryInfo          : InvalidOperation: (:) [Set-SwisObject], FaultException`1

          + FullyQualifiedErrorId : SwisError,SwisPowerShell.SetSwisObject

       

      This is how I used the function:

       

      Set-SwisObject $SWIS -Uri $URI -Properties @{Community = 'Test'}

       

      API connection and URI are both good and setting some other property (like 'IsServer') works just fine. I use NPM 12.1; SDK and PowerOrion are up to date.

       

      Also, my test node is added as a SNMP v2c node, not v3.

       

      What am I missing here?