You can use the NumMVObjects Method property to get the number of objects in the Forefront Identity Manager Synchronization Service (FIM Synchronization Service) database (metaverse).
The following Microsoft Visual Basic Scripting Edition (VBScript) example shows how to get the number of objects in the metaverse.
Visual Basic Script | Copy Code |
---|---|
Option Explicit On Error Resume Next Const PktPrivacy = 6 ' Authentication level Dim Service ' Service object Dim MVSet ' Metaverse collection Dim Metaverse ' Metaverse object Set Service = GetObject("winmgmts:{authenticationLevel=PktPrivacy}!root\MicrosoftIdentityIntegrationServer") Set MVSet = Service.ExecQuery("Select * From MIIS_Server") ' Get the number of objects in the <tla rid="fim_syncdb_short" />. For Each Metaverse in MVSet WScript.Echo "Server Name: " & Metaverse.Name WScript.Echo "Metaverse Objects: " & Metaverse.NumMVObjects Next Sub ErrorHandler (ErrorMessage) WScript.Echo ErrorMessage WScript.Quit(1) End Sub |