MSExchangeISMailbox vbscript 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 MSExchangeISMailbox WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Description
For this object, monitor the following counters:
- User Count - This displays the number of people currently using the Information Store (not the number of connections). It is impossible to properly judge the performance of a server running Exchange unless you know how many people are using it.
- RPC Requests - This shows the number of client requests currently being processed by the store. You should expect this figure to be fairly small, typically below 25. If it is consistently higher than this, your server is overloaded.
Sample Code
On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfRawData_MSExchangeIS_MSExchangeIS",,48) For Each objItem in colItems Wscript.Echo "ActiveAnonymousUserCount: " & objItem.ActiveAnonymousUserCount Wscript.Echo "ActiveConnectionCount: " & objItem.ActiveConnectionCount Wscript.Echo "ActiveUserCount: " & objItem.ActiveUserCount Wscript.Echo "AnonymousUserCount: " & objItem.AnonymousUserCount Wscript.Echo "AppointmentInstanceCreationRate: " & objItem.AppointmentInstanceCreationRate Wscript.Echo "AppointmentInstanceDeletionRate: " & objItem.AppointmentInstanceDeletionRate Wscript.Echo "AppointmentInstancesCreated: " & objItem.AppointmentInstancesCreated Wscript.Echo "AppointmentInstancesDeleted: " & objItem.AppointmentInstancesDeleted Wscript.Echo "Caption: " & objItem.Caption Wscript.Echo "ConnectionCount: " & objItem.ConnectionCount Wscript.Echo "DatabaseSessionHitRate: " & objItem.DatabaseSessionHitRate Wscript.Echo "DatabaseSessionHitRate_Base: " & objItem.DatabaseSessionHitRate_Base Wscript.Echo "Description: " & objItem.Description Wscript.Echo "FBPublishCount: " & objItem.FBPublishCount Wscript.Echo "FBPublishRate: " & objItem.FBPublishRate Wscript.Echo "Frequency_Object: " & objItem.Frequency_Object Wscript.Echo "Frequency_PerfTime: " & objItem.Frequency_PerfTime Wscript.Echo "Frequency_Sys100NS: " & objItem.Frequency_Sys100NS Wscript.Echo "MaximumAnonymousUsers: " & objItem.MaximumAnonymousUsers Wscript.Echo "MaximumConnections: " & objItem.MaximumConnections Wscript.Echo "MaximumUsers: " & objItem.MaximumUsers Wscript.Echo "Name: " & objItem.Name Wscript.Echo "PeakPushNotificationsCacheSize: " & objItem.PeakPushNotificationsCacheSize Wscript.Echo "PushNotificationsCacheSize: " & objItem.PushNotificationsCacheSize Wscript.Echo "PushNotificationsGeneratedPersec: " & objItem.PushNotificationsGeneratedPersec Wscript.Echo "PushNotificationsSkippedPersec: " & objItem.PushNotificationsSkippedPersec Wscript.Echo "ReadBytesRPCClientsPersec: " & objItem.ReadBytesRPCClientsPersec Wscript.Echo "RecurringAppointmentDeletionRate: " & objItem.RecurringAppointmentDeletionRate Wscript.Echo "RecurringAppointmentModificationRate: " & objItem.RecurringAppointmentModificationRate Wscript.Echo "RecurringAppointmentsCreated: " & objItem.RecurringAppointmentsCreated Wscript.Echo "RecurringAppointmentsDeleted: " & objItem.RecurringAppointmentsDeleted Wscript.Echo "RecurringAppointmentsModified: " & objItem.RecurringAppointmentsModified Wscript.Echo "RecurringApppointmentCreationRate: " & objItem.RecurringApppointmentCreationRate Wscript.Echo "RecurringMasterAppointmentsExpanded: " & objItem.RecurringMasterAppointmentsExpanded Wscript.Echo "RecurringMasterExpansionRate: " & objItem.RecurringMasterExpansionRate Wscript.Echo "RPCOperationsPersec: " & objItem.RPCOperationsPersec Wscript.Echo "RPCPacketsPersec: " & objItem.RPCPacketsPersec Wscript.Echo "RPCRequests: " & objItem.RPCRequests Wscript.Echo "RPCRequestsPeak: " & objItem.RPCRequestsPeak Wscript.Echo "SingleAppointmentCreationRate: " & objItem.SingleAppointmentCreationRate Wscript.Echo "SingleAppointmentDeletionRate: " & objItem.SingleAppointmentDeletionRate Wscript.Echo "SingleAppointmentModificationRate: " & objItem.SingleAppointmentModificationRate Wscript.Echo "SingleAppointmentsCreated: " & objItem.SingleAppointmentsCreated Wscript.Echo "SingleAppointmentsDeleted: " & objItem.SingleAppointmentsDeleted Wscript.Echo "SingleAppointmentsModified: " & objItem.SingleAppointmentsModified Wscript.Echo "Timestamp_Object: " & objItem.Timestamp_Object Wscript.Echo "Timestamp_PerfTime: " & objItem.Timestamp_PerfTime Wscript.Echo "Timestamp_Sys100NS: " & objItem.Timestamp_Sys100NS Wscript.Echo "UserCount: " & objItem.UserCount Wscript.Echo "WriteBytesRPCClientsPersec: " & objItem.WriteBytesRPCClientsPersec Next