Microsoft Identity Integration Server 2003 Developer Reference |
string NumMVObjects();
Return code | Description |
---|---|
call-failure | An unexpected error occurred. Check the event log. |
connection-failure | The server is not running or your credentials were removed from the security groups. Check that the credentials that you used belong to a member of a Microsoft Identity Integration Server 2003 security group. The method can return this string after you get the WMI provider object. |
The following example shows you how to use the Visual Basic Scripting Edition (VBScript) to get the number of objects in the metaverse using the ExecQuery method:
Option Explicity On Error Resume Next Dim Service Dim Servers Set Service = GetObject("winmgmts:root\MicrosoftIdentityIntegrationServer") Set Servers = Service.ExecQuery("Select * from MIIS_Server1") For Each Server in Servers WScript.Echo "Count of Metaverse Objects = " & Server.NumMvObjects() Next Sub ErrorHandler (ErrorMessage) WScript.Echo ErrorMessage WScript.Quit(1) End Sub
The following example uses the Get method to get the number of objects in the metaverse:
Option Explicit On Error Resume Next Dim Service Dim Server Set Service = GetObject("winmgmts:root\MicrosoftIdentityIntegrationServer") Set Server = Service.Get("MIIS_Server.Name='MIIS_Server1'") WScript.Echo "Count of Metaverse Objects = " & Server.NumMvObjects() Sub ErrorHandler (ErrorMessage) WScript.Echo ErrorMessage WScript.Quit(1) End Sub
Server: Requires Microsoft Identity Integration
Server 2003.
Header: Declared in mmswmi.mof.