Win32_PerfFormattedData_ADWS 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_ADWS 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_ADWS_ADWS" foreach ($obj in $objWmi) { write-host "ActiveWebServiceSessions:" $obj.ActiveWebServiceSessions write-host "AllocatedConnections:" $obj.AllocatedConnections write-host "Caption:" $obj.Caption write-host "ChangeOptionalFeatureOperationsPerSecond:" $obj.ChangeOptionalFeatureOperationsPerSecond write-host "ChangePasswordOperationsPerSecond:" $obj.ChangePasswordOperationsPerSecond write-host "CreateOperationsPerSecond:" $obj.CreateOperationsPerSecond write-host "CustomActionCacheSize:" $obj.CustomActionCacheSize write-host "CustomActionDSRPCCacheConnectionCreationRate:" $obj.CustomActionDSRPCCacheConnectionCreationRate write-host "CustomActionDSRPCCacheConnectionReuseRate:" $obj.CustomActionDSRPCCacheConnectionReuseRate write-host "CustomActionDSRPCCacheMaximumPossibleSize:" $obj.CustomActionDSRPCCacheMaximumPossibleSize write-host "CustomActionLDAPCacheConnectionCreationRate:" $obj.CustomActionLDAPCacheConnectionCreationRate write-host "CustomActionLDAPCacheConnectionReuseRate:" $obj.CustomActionLDAPCacheConnectionReuseRate write-host "CustomActionLDAPCacheMaximumPossibleSize:" $obj.CustomActionLDAPCacheMaximumPossibleSize write-host "DeleteOperationsPerSecond:" $obj.DeleteOperationsPerSecond write-host "Description:" $obj.Description write-host "EnumerateOperationsPerSecond:" $obj.EnumerateOperationsPerSecond write-host "Frequency_Object:" $obj.Frequency_Object write-host "Frequency_PerfTime:" $obj.Frequency_PerfTime write-host "Frequency_Sys100NS:" $obj.Frequency_Sys100NS write-host "GetADDomainControllerOperationsPerSecond:" $obj.GetADDomainControllerOperationsPerSecond write-host "GetADDomainOperationsPerSecond:" $obj.GetADDomainOperationsPerSecond write-host "GetADForestOperationsPerSecond:" $obj.GetADForestOperationsPerSecond write-host "GetADGroupMemberOperationsPerSecond:" $obj.GetADGroupMemberOperationsPerSecond write-host "GetADPrincipalAuthorizationGroupOperationsPerSecond:" $obj.GetADPrincipalAuthorizationGroupOperationsPerSecond write-host "GetADPrincipalGroupMembershipOperationsPerSecond:" $obj.GetADPrincipalGroupMembershipOperationsPerSecond write-host "GetOperationsPerSecond:" $obj.GetOperationsPerSecond write-host "GetVersionOperationsPerSecond:" $obj.GetVersionOperationsPerSecond write-host "MoveADOperationMasterRoleOperationsPerSecond:" $obj.MoveADOperationMasterRoleOperationsPerSecond write-host "Name:" $obj.Name write-host "NonreservedConnectionsInUse:" $obj.NonreservedConnectionsInUse write-host "NumberofDirectoryInstances:" $obj.NumberofDirectoryInstances write-host "OpenEnumerationContexts:" $obj.OpenEnumerationContexts write-host "OpenWebServiceSessions:" $obj.OpenWebServiceSessions write-host "PossibleConnections:" $obj.PossibleConnections write-host "PullOperationsPerSecond:" $obj.PullOperationsPerSecond write-host "PutOperationsPerSecond:" $obj.PutOperationsPerSecond write-host "ReservedConnections:" $obj.ReservedConnections write-host "ReservedConnectionsInUse:" $obj.ReservedConnectionsInUse write-host "SetPasswordOperationsPerSecond:" $obj.SetPasswordOperationsPerSecond write-host "Timestamp_Object:" $obj.Timestamp_Object write-host "Timestamp_PerfTime:" $obj.Timestamp_PerfTime write-host "Timestamp_Sys100NS:" $obj.Timestamp_Sys100NS write-host "TranslateNameOperationsPerSecond:" $obj.TranslateNameOperationsPerSecond write-host "WebServiceSessionsCreatedPerSecond:" $obj.WebServiceSessionsCreatedPerSecond write-host write-host "########" write-host }