1 Reply Latest reply on Apr 5, 2017 10:49 AM by tdanner

    UNMANAGE AN ADMIN DOWN INTERFACE USING SDK

    ianishant

       

      Hi all.

       

      I have a requirement to stop polling all interfaces for a device which are Admin shut. The option I thought of is to un-manage such interface for a specific time using SDK (powershell script) and execute it using alert manage for all interfaces which admin status as "Down".

       

      Need experts help to validate the approach and the SDK code to unmange an interface.

       

      Thanks.

      Nishant

        • Re: UNMANAGE AN ADMIN DOWN INTERFACE USING SDK
          tdanner

          An alert action to unmanage the interface seems like a good way to handle this requirement. Obviously when you unmanage the interface, NPM won't be polling it and therefore won't detect when the interface comes back up. When the unmanage expires, the polling will resume and the status will be detected again.

           

          Here's a command line you can use with the "execute an external program" action:

           

          powershell invoke-command -scr {Add-Pssnapin swissnapin ; Invoke-SwisVerb (Connect-Swis -Certificate) Orion.NPM.Interfaces Unmanage @('I:${N=SwisEntity;M=InterfaceID}', [DateTime]::UtcNow, [DateTime]::UtcNow.AddHours(1), $false)}

           

          You will need to have the Orion SDK installed on the Orion server for this to work.