NumMVObjects Method of the MIIS_Server Class
The NumMVObjects method returns the number of all objects in the metaverse. To use this method, you must be logged on as a member of the MIISOperators or the MIISAdmins security group.
Syntax
string NumMVObjects();
Parameters
This method has no parameters.
Return Value
Returns the number of all objects in the metaverse or the following return values.
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. |
Examples
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
Requirements
Product | ILM 2007 FP1 |
MOF | Mmswmi.mof |
See Also
Send comments about this topic to Microsoft
Build date: 2/16/2009