ActiveXperts Network Monitor

Quicklinks


NOTE: ActiveXperts Network Monitor ships with a large collection of PowerShell scripts to monitor any aspect of your network. Most PowerShell scripts also have a VBScript implementation. Download Now »


RADIUS check

You can use any of the Powershell programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.


Example

#################################################################################
# ActiveXperts Network Monitor PowerShell script, © ActiveXperts Software B.V.
# For more information about ActiveXperts Network Monitor, visit the ActiveXperts 
# Network Monitor web site at http://www.activexperts.com
#################################################################################
# Script
#     Radius.ps1
# Description:
#     Check a RADIUS server for accessibility
#     This function uses the ActiveSocket Toolkit, an ActiveXperts product.
#     ActiveSocket is automatically licensed when ActiveXperts Network Monitor is purchased
#     For more information about ActiveSocket, see: www.activexperts.com/network-component
# Parameters:
#     1) strHost - Host name or IP address of the RADIUS server
#     2) strUser - RADIUS User
#     3) strPassword - Password of the RADIUS user
#     4) strSecret - RADIUS secret
# Usage:
#     .\Radius "" "" "" ""
# Sample:
#     .\Radius "10.1.1.100" "johndoe" "mypassword" "mysecret"
#################################################################################

# Parameters
param
  (
    [string]$strHost,
    [string]$strUser,
    [string]$strPassword,
    [string]$strSecret
  )

cls


# Check parameters input
if( ([string]$strHost -eq "") -or ([string]$strUser -eq "") -or ($strPassword -eq "") -or ($strSecret -eq "") )
  {
    $res = "UNCERTAIN: Invalid number of parameters - Usage: .\CheckRadius.ps1     [alt-credentials]"
    echo $res
    exit
  }

if($colCpu -eq $null )
  {
    $res = "UNCERTAIN: Unable to connect. Please make sure that PowerShell and WMI are both installed on the monitered system. Also check your credentials"
    echo $res
    exit
  }

#################################################################################
# THE SCRIPT ITSELF
#################################################################################
 
$objRadius = new-object -comobject ActiveXperts.Radius

# Use default port 1812
$objRadius.Port           = 1812

# Login
$objRadius.CheckAccess($strHost, $strUser, $strPassword, $strSecret)

if( $objRadius.LastError -eq 0 )
  {
    return "SUCCESS: ADIUS server accessible DATA: 1"
  }  
else
  {
    return "ERROR: Failed to access RADIUS server; result=[" + $objRadius.LastError + ": " + $objRadius.GetErrorDescription( $objRadius.LastError ) + "] DATA: 0"
  }