Documentation forServer & Application Monitor
Monitoring your applications and environment is a key capability of Hybrid Cloud Observability and is also available in a standalone module, Server & Application Monitor (SAM). Hybrid Cloud Observability and SAM are built on the self-hosted SolarWinds Platform.

Create a firewall rule for AppInsight for Exchange in SAM

To add a firewall rule to support AppInsight for Exchange:

  1. Open PowerShell in the Run as Administrator context.

    Depending on how it's used, PowerShell can make your deployment vulnerable to unauthorized access. For details, see Use PowerShell in SAM.

  2. Create a function for adding firewall rules using the following code:

    function Add-FirewallRule {
    param(
    $name,
    $tcpPorts,
    $appName = $null,
    $serviceName = $null
    )
    $fw = New-Object -ComObject hnetcfg.fwpolicy2
    $rule = New-Object -ComObject HNetCfg.FWRule
    $rule.Name = $name
    if ($appName -ne $null) { $rule.ApplicationName = $appName }
    if ($serviceName -ne $null) { $rule.serviceName = $serviceName }
    $rule.Protocol = 6 #NET_FW_IP_PROTOCOL_TCP
    $rule.LocalPorts = $tcpPorts
    $rule.Enabled = $true
    $rule.Grouping = "@firewallapi.dll,-23255"
    $rule.Profiles = 7 # all
    $rule.Action = 1 # NET_FW_ACTION_ALLOW
    $rule.EdgeTraversal = $false
    $fw.Rules.Add($rule)
    }
  3. Run the function to create the firewall exception for WSMAN using the following command:Add-FirewallRule "Windows Remote Management" "5986" $null $null

  4. Verify the rule was created by navigating to Control Panel > Windows Firewall > Advanced Settings.
  5. Configure AppInsight for Exchange by clicking Configure Server.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.