3 Replies Latest reply on Jul 24, 2017 3:26 PM by tdanner

    PowerShell - Create and update Custom Property for a node being monitored via ICMP.


      Hello Orion Experts.

      I am trying to create and update custom property values for 300+ nodes that are being monitored via ICMP.  Found a script OrionSDK/CRUD.SettingCustomProperty.ps1 at master · solarwinds/OrionSDK · GitHub  to update the custom property. When i try to get the data from Swis using Get-OrionNode command i do not get property interfaceID. the script above is using interface Id to set and update the property values.  Script above is asking to build interface ID.  Please let me know if i am using a wrong interface or if there is a better way to get the task done.


      $uri = "swis://localhost/Orion/Orion.Nodes/NodeID=$($nodeId)/CustomProperties";
      # set the custom property
      Set-SwisObject $swis -Uri $uri -Properties $customProps
      # build the interface URI
      $uri = "swis://localhost/Orion/Orion.Nodes/NodeID=$($nodeId)/Interfaces/InterfaceID=$($ifaceId)/CustomProperties";



      Following is the datatype from Get-OrionNode output. 


      TypeName: System.Management.Automation.PSCustomObject



      Name                                  MemberType   Definition                                                              

      ----                                  ----------   ----------                                                              

      Equals                                Method       bool Equals(System.Object obj)                                          

      GetHashCode                           Method       int GetHashCode()                                                       

      GetType                               Method       type GetType()                                                          

      ToString                              Method       string ToString()                                                       

      AgentPort                             NoteProperty string AgentPort=161                                                    

      Allow64BitCounters                    NoteProperty bool Allow64BitCounters=True                                            

      AncestorDetailsUrls                   NoteProperty string[] AncestorDetailsUrls=System.String[]                            

      AncestorDisplayNames                  NoteProperty string[] AncestorDisplayNames=System.String[]                           

      AvgResponseTime                       NoteProperty int AvgResponseTime=1                                                   

      BlockUntil                            NoteProperty datetime BlockUntil=12/30/1899 4:00:00 AM                               

      BufferBgMissThisHour                  NoteProperty double BufferBgMissThisHour=0                                           

      BufferBgMissToday                     NoteProperty double BufferBgMissToday=0                                              

      BufferHgMissThisHour                  NoteProperty double BufferHgMissThisHour=0                                           

      BufferHgMissToday                     NoteProperty double BufferHgMissToday=0                                              

      BufferLgMissThisHour                  NoteProperty double BufferLgMissThisHour=0                                           

      BufferLgMissToday                     NoteProperty double BufferLgMissToday=0                                              

      BufferMdMissThisHour                  NoteProperty double BufferMdMissThisHour=0                                           

      BufferMdMissToday                     NoteProperty double BufferMdMissToday=0                                              

      BufferNoMemThisHour                   NoteProperty double BufferNoMemThisHour=0                                            

      BufferNoMemToday                      NoteProperty double BufferNoMemToday=0                                               

      BufferSmMissThisHour                  NoteProperty double BufferSmMissThisHour=0                                           

      BufferSmMissToday                     NoteProperty double BufferSmMissToday=0                                              

      Caption                               NoteProperty string Caption=nyu01cu1.stnyu01.isyntax.net                             

      Category                              NoteProperty int Category=2                                                          

      ChildStatus                           NoteProperty int ChildStatus=1                                                       

      CMTS                                  NoteProperty char CMTS=N                                                             

      Community                             NoteProperty string Community=                                                       

      Contact                               NoteProperty string Contact=                                                         

      CPULoad                               NoteProperty int CPULoad=-2                                                          

      CustomPollerLastStatisticsPoll        NoteProperty datetime CustomPollerLastStatisticsPoll=12/30/1899 4:00:00 AM           

      CustomPollerLastStatisticsPollSuccess NoteProperty datetime CustomPollerLastStatisticsPollSuccess=12/30/1899 4:00:00 AM    

      CustomStatus                          NoteProperty bool CustomStatus=False                                                 

      Description                           NoteProperty string Description=Unknown                                              

      DetailsUrl                            NoteProperty string DetailsUrl=/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:6255   

      DisplayName                           NoteProperty string DisplayName=             

      DNS                                   NoteProperty string DNS=                                                             

      DynamicIP                             NoteProperty bool DynamicIP=False                                                    

      EngineID                              NoteProperty int EngineID=9                                                          

      EntityType                            NoteProperty string EntityType=Orion.Nodes                                           

      External                              NoteProperty bool External=False                                                     

      GroupStatus                           NoteProperty string GroupStatus=Up.gif                                               

      Icon                                  NoteProperty string Icon=Unknown.gif                                                 

      Image                                 NoteProperty DBNull Image=                                                           

      InstanceSiteId                        NoteProperty int InstanceSiteId=0                                                    

      InstanceType                          NoteProperty string InstanceType=Orion.Nodes                                         

      IOSImage                              NoteProperty string IOSImage=                                                        

      IOSVersion                            NoteProperty string IOSVersion=                                                      

      IP                                    NoteProperty string IP=                                             

      IPAddress                             NoteProperty string IPAddress=                                     

      IPAddressGUID                         NoteProperty guid IPAddressGUID=               

      IPAddressType                         NoteProperty string IPAddressType=IPv4                                               

      IP_Address                            NoteProperty string IP_Address=                                      

      IsOrionServer                         NoteProperty bool IsOrionServer=False                                                

      IsServer                              NoteProperty bool IsServer=False                                                     

      LastBoot                              NoteProperty DBNull LastBoot=                                                        

      LastSync                              NoteProperty datetime LastSync=                              

      LastSystemUpTimePollUtc               NoteProperty DBNull LastSystemUpTimePollUtc=                                         

      Location                              NoteProperty string Location=                                                        

      MachineType                           NoteProperty string MachineType=Unknown                                              

      MaxResponseTime                       NoteProperty int MaxResponseTime=2                                                   

      MemoryAvailable                       NoteProperty DBNull MemoryAvailable=                                                 

      MemoryUsed                            NoteProperty double MemoryUsed=-2                                                    

      MinResponseTime                       NoteProperty int MinResponseTime=1                                                   

      MinutesSinceLastSync                  NoteProperty int MinutesSinceLastSync=1                                              

      NextPoll                              NoteProperty datetime NextPoll=                          


      NodeDescription                       NoteProperty string NodeDescription=                                                 

      NodeID                                NoteProperty int NodeID=6255                                                         


      ObjectSubType                         NoteProperty string ObjectSubType=ICMP                                               

      OrionIdColumn                         NoteProperty string OrionIdColumn=NodeID                                             

      OrionIdPrefix                         NoteProperty string OrionIdPrefix=N:                                                 

      PercentLoss                           NoteProperty double PercentLoss=0                                                    

      PercentMemoryAvailable                NoteProperty int PercentMemoryAvailable=100                                          

      PercentMemoryUsed                     NoteProperty int PercentMemoryUsed=0                                                 

      PollInterval                          NoteProperty int PollInterval=90                                                     

      RediscoveryInterval                   NoteProperty int RediscoveryInterval=30                                              

      ResponseTime                          NoteProperty int ResponseTime=2                                                      

      RWCommunity                           NoteProperty string RWCommunity=                                                     

      Severity                              NoteProperty int Severity=0                                                          

      SkippedPollingCycles                  NoteProperty int SkippedPollingCycles=0                                              

      SNMPVersion                           NoteProperty int16 SNMPVersion=0                                                     

      StatCollection                        NoteProperty int StatCollection=10                                                   

      Status                                NoteProperty int Status=1                                                            

      StatusDescription                     NoteProperty string StatusDescription=Node status is Up.                             

      StatusIcon                            NoteProperty string StatusIcon=Up.gif                                                

      StatusIconHint                        NoteProperty DBNull StatusIconHint=                                                  

      StatusLED                             NoteProperty string StatusLED=Up.gif                                                 

      SysName                               NoteProperty string SysName=                                                         

      SysObjectID                           NoteProperty string SysObjectID=                                                     

      SystemUpTime                          NoteProperty double SystemUpTime=0                                                   

      TotalMemory                           NoteProperty float TotalMemory=0                                                     

      UiSeverity                            NoteProperty int UiSeverity=0                                                        

      UnManaged                             NoteProperty bool UnManaged=False                                                    

      UnManageFrom                          NoteProperty datetime UnManageFrom=12/30/1899 12:00:00 AM                            

      UnManageUntil                         NoteProperty datetime UnManageUntil=12/30/1899 12:00:00 AM                           

      Vendor                                NoteProperty string Vendor=Unknown                                                   

      VendorIcon                            NoteProperty string VendorIcon=Unknown.gif