MSFT_Computer.ScanManagedComputer Method
Initiates an immediate scan of a specific computer by MOM.
MSFT_Computer.ScanManagedComputer()
Parameters
None
Return Value
This method returns an unsigned 32-bit integer indicating its status.
Remarks
Note
This method is deprecated in MOM 2005 and should not be used. MOM 2005 does not use an Agent Manager component. In MOM 2005, calls to this method do not return an error code, but the method has no effect on agents.
Examples
The following example shows the use of the ScanManagedComputer method.
'*********************************************************************
' Routine: Function ScanComputersInDomain
' Purpose: Starts a scan on all computers in the specified domain.
' Arguments: The server running MOM, the domain to scan.
' Returns: The number of computers scanned.
'
'**********************************************************************
Function ScanComputersInDomain(strMOMServer, strDomain)
Dim objComputers, objComputer
Dim lngStatus, lngCount
lngCount = 0
Set objComputers = GetObject("WinMgmts://" & strMOMServer & "\root\MOM").ExecQuery("SELECT * FROM MSFT_Computer WHERE Domain='" & strDomain & "'")
For Each objComputer In objComputers
lngStatus = objComputer.ScanManagedComputer()
WScript.Echo("Scanning: " & objComputer.Name & " (Status=" & CStr(lngStatus) & ")")
lngCount = lngCount + 1
Next
ScanComputersInDomain = lngCount
End Function
Requirements
Platforms: Requires Windows 2000 Server or later
Version: Requires MOM 2000 SP1 or later
See Also
MSFT_Computer Class | MSFT_Computer.ScanAllManagedComputers Method