Win32_PerfRawData_FileReplicaSet jscript 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_PerfRawData_FileReplicaSet WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
var strComputer = "."; var objWMIService = GetObject("winmgmts:\\\\" + strComputer + "\\root\\CIMV2"); var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PerfRawData_FileReplicaSet_FileReplicaSet", "WQL"); var enumItems = new Enumerator(colItems); for (; !enumItems.atEnd(); enumItems.moveNext()) { var objItem = enumItems.item(); WScript.Echo("Authentications: " + objItem.Authentications); WScript.Echo("AuthenticationsinError: " + objItem.AuthenticationsinError); WScript.Echo("Bindings: " + objItem.Bindings); WScript.Echo("BindingsinError: " + objItem.BindingsinError); WScript.Echo("BytesofFilesInstalled: " + objItem.BytesofFilesInstalled); WScript.Echo("BytesofStagingFetched: " + objItem.BytesofStagingFetched); WScript.Echo("BytesofStagingGenerated: " + objItem.BytesofStagingGenerated); WScript.Echo("BytesofStagingRegenerated: " + objItem.BytesofStagingRegenerated); WScript.Echo("Caption: " + objItem.Caption); WScript.Echo("ChangeOrdersAborted: " + objItem.ChangeOrdersAborted); WScript.Echo("ChangeOrdersEvaporated: " + objItem.ChangeOrdersEvaporated); WScript.Echo("ChangeOrdersIssued: " + objItem.ChangeOrdersIssued); WScript.Echo("ChangeOrdersMorphed: " + objItem.ChangeOrdersMorphed); WScript.Echo("ChangeOrdersPropagated: " + objItem.ChangeOrdersPropagated); WScript.Echo("ChangeOrdersReceived: " + objItem.ChangeOrdersReceived); WScript.Echo("ChangeOrdersRetired: " + objItem.ChangeOrdersRetired); WScript.Echo("ChangeOrdersRetried: " + objItem.ChangeOrdersRetried); WScript.Echo("ChangeOrdersRetriedatFetch: " + objItem.ChangeOrdersRetriedatFetch); WScript.Echo("ChangeOrdersRetriedatGenerate: " + objItem.ChangeOrdersRetriedatGenerate); WScript.Echo("ChangeOrdersRetriedatInstall: " + objItem.ChangeOrdersRetriedatInstall); WScript.Echo("ChangeOrdersRetriedatRename: " + objItem.ChangeOrdersRetriedatRename); WScript.Echo("ChangeOrdersSent: " + objItem.ChangeOrdersSent); WScript.Echo("CommunicationTimeouts: " + objItem.CommunicationTimeouts); WScript.Echo("Description: " + objItem.Description); WScript.Echo("DSBindings: " + objItem.DSBindings); WScript.Echo("DSBindingsinError: " + objItem.DSBindingsinError); WScript.Echo("DSObjects: " + objItem.DSObjects); WScript.Echo("DSObjectsinError: " + objItem.DSObjectsinError); WScript.Echo("DSPolls: " + objItem.DSPolls); WScript.Echo("DSPollswithChanges: " + objItem.DSPollswithChanges); WScript.Echo("DSPollswithoutChanges: " + objItem.DSPollswithoutChanges); WScript.Echo("DSSearches: " + objItem.DSSearches); WScript.Echo("DSSearchesinError: " + objItem.DSSearchesinError); WScript.Echo("FetchBlocksReceived: " + objItem.FetchBlocksReceived); WScript.Echo("FetchBlocksReceivedinBytes: " + objItem.FetchBlocksReceivedinBytes); WScript.Echo("FetchBlocksSent: " + objItem.FetchBlocksSent); WScript.Echo("FetchBlocksSentinBytes: " + objItem.FetchBlocksSentinBytes); WScript.Echo("FetchRequestsReceived: " + objItem.FetchRequestsReceived); WScript.Echo("FetchRequestsSent: " + objItem.FetchRequestsSent); WScript.Echo("FilesInstalled: " + objItem.FilesInstalled); WScript.Echo("FilesInstalledwithError: " + objItem.FilesInstalledwithError); WScript.Echo("Frequency_Object: " + objItem.Frequency_Object); WScript.Echo("Frequency_PerfTime: " + objItem.Frequency_PerfTime); WScript.Echo("Frequency_Sys100NS: " + objItem.Frequency_Sys100NS); WScript.Echo("InboundChangeOrdersDampened: " + objItem.InboundChangeOrdersDampened); WScript.Echo("JoinNotificationsReceived: " + objItem.JoinNotificationsReceived); WScript.Echo("JoinNotificationsSent: " + objItem.JoinNotificationsSent); WScript.Echo("Joins: " + objItem.Joins); WScript.Echo("KBofStagingSpaceFree: " + objItem.KBofStagingSpaceFree); WScript.Echo("KBofStagingSpaceInUse: " + objItem.KBofStagingSpaceInUse); WScript.Echo("LocalChangeOrdersAborted: " + objItem.LocalChangeOrdersAborted); WScript.Echo("LocalChangeOrdersIssued: " + objItem.LocalChangeOrdersIssued); WScript.Echo("LocalChangeOrdersMorphed: " + objItem.LocalChangeOrdersMorphed); WScript.Echo("LocalChangeOrdersPropagated: " + objItem.LocalChangeOrdersPropagated); WScript.Echo("LocalChangeOrdersRetired: " + objItem.LocalChangeOrdersRetired); WScript.Echo("LocalChangeOrdersRetried: " + objItem.LocalChangeOrdersRetried); WScript.Echo("LocalChangeOrdersRetriedatFetch: " + objItem.LocalChangeOrdersRetriedatFetch); WScript.Echo("LocalChangeOrdersRetriedatGenerate: " + objItem.LocalChangeOrdersRetriedatGenerate); WScript.Echo("LocalChangeOrdersRetriedatInstall: " + objItem.LocalChangeOrdersRetriedatInstall); WScript.Echo("LocalChangeOrdersRetriedatRename: " + objItem.LocalChangeOrdersRetriedatRename); WScript.Echo("LocalChangeOrdersSent: " + objItem.LocalChangeOrdersSent); WScript.Echo("LocalChangeOrdersSentAtJoin: " + objItem.LocalChangeOrdersSentAtJoin); WScript.Echo("Name: " + objItem.Name); WScript.Echo("OutboundChangeOrdersDampened: " + objItem.OutboundChangeOrdersDampened); WScript.Echo("PacketsReceived: " + objItem.PacketsReceived); WScript.Echo("PacketsReceivedinBytes: " + objItem.PacketsReceivedinBytes); WScript.Echo("PacketsReceivedinError: " + objItem.PacketsReceivedinError); WScript.Echo("PacketsSent: " + objItem.PacketsSent); WScript.Echo("PacketsSentinBytes: " + objItem.PacketsSentinBytes); WScript.Echo("PacketsSentinError: " + objItem.PacketsSentinError); WScript.Echo("RemoteChangeOrdersAborted: " + objItem.RemoteChangeOrdersAborted); WScript.Echo("RemoteChangeOrdersIssued: " + objItem.RemoteChangeOrdersIssued); WScript.Echo("RemoteChangeOrdersMorphed: " + objItem.RemoteChangeOrdersMorphed); WScript.Echo("RemoteChangeOrdersPropagated: " + objItem.RemoteChangeOrdersPropagated); WScript.Echo("RemoteChangeOrdersReceived: " + objItem.RemoteChangeOrdersReceived); WScript.Echo("RemoteChangeOrdersRetired: " + objItem.RemoteChangeOrdersRetired); WScript.Echo("RemoteChangeOrdersRetried: " + objItem.RemoteChangeOrdersRetried); WScript.Echo("RemoteChangeOrdersRetriedatFetch: " + objItem.RemoteChangeOrdersRetriedatFetch); WScript.Echo("RemoteChangeOrdersRetriedatGenerate: " + objItem.RemoteChangeOrdersRetriedatGenerate); WScript.Echo("RemoteChangeOrdersRetriedatInstall: " + objItem.RemoteChangeOrdersRetriedatInstall); WScript.Echo("RemoteChangeOrdersRetriedatRename: " + objItem.RemoteChangeOrdersRetriedatRename); WScript.Echo("RemoteChangeOrdersSent: " + objItem.RemoteChangeOrdersSent); WScript.Echo("ReplicaSetsCreated: " + objItem.ReplicaSetsCreated); WScript.Echo("ReplicaSetsDeleted: " + objItem.ReplicaSetsDeleted); WScript.Echo("ReplicaSetsRemoved: " + objItem.ReplicaSetsRemoved); WScript.Echo("ReplicaSetsStarted: " + objItem.ReplicaSetsStarted); WScript.Echo("StagingFilesFetched: " + objItem.StagingFilesFetched); WScript.Echo("StagingFilesGenerated: " + objItem.StagingFilesGenerated); WScript.Echo("StagingFilesGeneratedwithError: " + objItem.StagingFilesGeneratedwithError); WScript.Echo("StagingFilesRegenerated: " + objItem.StagingFilesRegenerated); WScript.Echo("Threadsexited: " + objItem.Threadsexited); WScript.Echo("Threadsstarted: " + objItem.Threadsstarted); WScript.Echo("Timestamp_Object: " + objItem.Timestamp_Object); WScript.Echo("Timestamp_PerfTime: " + objItem.Timestamp_PerfTime); WScript.Echo("Timestamp_Sys100NS: " + objItem.Timestamp_Sys100NS); WScript.Echo("Unjoins: " + objItem.Unjoins); WScript.Echo("UsnReads: " + objItem.UsnReads); WScript.Echo("UsnRecordsAccepted: " + objItem.UsnRecordsAccepted); WScript.Echo("UsnRecordsExamined: " + objItem.UsnRecordsExamined); WScript.Echo("UsnRecordsRejected: " + objItem.UsnRecordsRejected); WScript.Echo("") WScript.Echo("########") WScript.Echo("") }