Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. External Parameter (Powershell)

External Parameter (Powershell)

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 12.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    I
    ITR
    wrote on last edited by
    #1

    Hi,

    is it possible to use the Exchange 2013 powershell commands?
    The normal powershell commands are working, but the module/snapins are not imported into the normal powershell - is it possible?

    I want to monitor an DAG and i need this commands from the Exchange powershell module:

    for example:

    Get-MailboxDatabaseCopyStatus | fl -Property Status

    Thx,
    Didi

    1 Reply Last reply
    0
    • A
      A
      Alex Kirhenshtein
      wrote on last edited by
      #2

      You can try to create ps1 script like this:

      add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010
      Get-MailboxDatabaseCopyStatus | fl -Property Status
      
      1 Reply Last reply
      0
      • I
        I
        ITR
        wrote on last edited by
        #3

        Hi Alex,

        thx for the hint its working.

        For all others:

        Raise the timeout for Server AgentCommandTimeOut and on Agent ExecTimeout (PSSnapIn needs to load a few seconds) (defaults are: 2000 on agent and 4000 on server)

        Server Configuration:

        AgentCommandTimeOut = 20000

        Agent Configuration (for example):

        ExecTimeout = 20000
        ExternalParameter = DAG2013Healthstatus.status:"C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" "C:\Scripts\Get-MailboxDatabaseCopyStatus.ps1"

        Content of PS1

        Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn
        Get-MailboxDatabaseCopyStatus | fl -Property Status

        Thx

        1 Reply Last reply
        0
        • A
          A
          Alex Kirhenshtein
          wrote on last edited by
          #4

          I suggest you to change it from ExternalParameter to ExternalParameterProvider, this way data collection will work faster.
          Detailed description: https://wiki.netxms.org/wiki/ExternalParametersProvider

          1 Reply Last reply
          0
          • I
            I
            ITR
            wrote on last edited by
            #5

            OK i try this.

            Is it possible to do a treshold with an OR connection - because i get:

            Server 1: Status : Mounted
            Server 2: Status : Healthy

            Ive created 2 Tresholds not equal "Status : Mounted" and not equal "Status : Healthy" and clicked "process all tresholds" but it dont seem that this works

            Thx

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              Hi,

              you can use script for threshold checking.

              Best regards,
              Victor

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups