Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI » powershell sample

Win32_PerfFormattedData_RoutingAppPerf powershell sample code

The foundations for Manageability in Windows is Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself. The Win32_PerfFormattedData_RoutingAppPerf WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Sample Code

$strComputer = "."

$objWMi = get-wmiobject -computername localhost -Namespace root\CIMV2 -Query "Select * from Win32_PerfFormattedData_RoutingAppPerf_LCRoutingApps00UCRoutingApplications"

foreach ($obj in $objWmi)
{
	write-host "Caption:" $obj.Caption
	write-host "Description:" $obj.Description
	write-host "Frequency_Object:" $obj.Frequency_Object
	write-host "Frequency_PerfTime:" $obj.Frequency_PerfTime
	write-host "Frequency_Sys100NS:" $obj.Frequency_Sys100NS
	write-host "Name:" $obj.Name
	write-host "RoutingApps000TranslatedNumbers:" $obj.RoutingApps000TranslatedNumbers
	write-host "RoutingApps001TranslatedNumberspersecond:" $obj.RoutingApps001TranslatedNumberspersecond
	write-host "RoutingApps002Callstovoicemail:" $obj.RoutingApps002Callstovoicemail
	write-host "RoutingApps003Callstovoicemailpersecond:" $obj.RoutingApps003Callstovoicemailpersecond
	write-host "RoutingApps004CallstoSAAA:" $obj.RoutingApps004CallstoSAAA
	write-host "RoutingApps005ErrorsfromUMserver:" $obj.RoutingApps005ErrorsfromUMserver
	write-host "RoutingApps006FailedExchangeUMcalls:" $obj.RoutingApps006FailedExchangeUMcalls
	write-host "RoutingApps007FailedOutboundPSTNcalls:" $obj.RoutingApps007FailedOutboundPSTNcalls
	write-host "RoutingApps008OutboundPSTNcalls:" $obj.RoutingApps008OutboundPSTNcalls
	write-host "RoutingApps009OutboundPSTNcallspersecond:" $obj.RoutingApps009OutboundPSTNcallspersecond
	write-host "RoutingApps010Inboundcalls:" $obj.RoutingApps010Inboundcalls
	write-host "RoutingApps011Inboundcallspersecond:" $obj.RoutingApps011Inboundcallspersecond
	write-host "RoutingApps012InboundContactObjectcalls:" $obj.RoutingApps012InboundContactObjectcalls
	write-host "RoutingApps013SuccessfulInboundcalls:" $obj.RoutingApps013SuccessfulInboundcalls
	write-host "RoutingApps014Forwardedcalls:" $obj.RoutingApps014Forwardedcalls
	write-host "RoutingApps015Simulringcalls:" $obj.RoutingApps015Simulringcalls
	write-host "RoutingApps016Delegatecalls:" $obj.RoutingApps016Delegatecalls
	write-host "RoutingApps017Teamcalls:" $obj.RoutingApps017Teamcalls
	write-host "RoutingApps018Instancesofreceivinginvalidlocationprofile:" $obj.RoutingApps018Instancesofreceivinginvalidlocationprofile
	write-host "RoutingApps019Instanceswherenomatchinnormalizationrulesoflocationprofile:" $obj.RoutingApps019Instanceswherenomatchinnormalizationrulesoflocationprofile
	write-host "RoutingApps020Instanceswherethematchingrulecausedafailedtranslation:" $obj.RoutingApps020Instanceswherethematchingrulecausedafailedtranslation
	write-host "RoutingApps021CallsmadetoVOIPgatewayswhichweresuccessful:" $obj.RoutingApps021CallsmadetoVOIPgatewayswhichweresuccessful
	write-host "RoutingApps022Received5XXfromVOIPgateway:" $obj.RoutingApps022Received5XXfromVOIPgateway
	write-host "RoutingApps023Gatewaydetectedtobeup:" $obj.RoutingApps023Gatewaydetectedtobeup
	write-host "RoutingApps024Gatewaydetectedtobedown:" $obj.RoutingApps024Gatewaydetectedtobedown
	write-host "RoutingApps025Callsfailedduetogatewayunavailability:" $obj.RoutingApps025Callsfailedduetogatewayunavailability
	write-host "RoutingApps026Callsfailedduetonomatchingroute:" $obj.RoutingApps026Callsfailedduetonomatchingroute
	write-host "Timestamp_Object:" $obj.Timestamp_Object
	write-host "Timestamp_PerfTime:" $obj.Timestamp_PerfTime
	write-host "Timestamp_Sys100NS:" $obj.Timestamp_Sys100NS
	write-host
	write-host "########"
	write-host
}