CimSession.TestConnection Method (CimInstance, CimException)
Tests a connection by communicating with the server represented by the session to determine whether it is responding.
Namespace: Microsoft.Management.Infrastructure
Assembly: Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)
Syntax
public bool TestConnection(
out CimInstance instance,
out CimException exception
)
public:
bool TestConnection(
[OutAttribute] CimInstance^% instance,
[OutAttribute] CimException^% exception
)
member TestConnection :
instance:CimInstance byref *
exception:CimException byref -> bool
Public Function TestConnection (
<OutAttribute> ByRef instance As CimInstance,
<OutAttribute> ByRef exception As CimException
) As Boolean
Parameters
instance
Type: Microsoft.Management.Infrastructure.CimInstanceA CimInstance object that contains test data from the CIM server (usually identifying the server and operating system version) if the connection attempt succeeds.
exception
Type: Microsoft.Management.Infrastructure.CimExceptionA CimException object that contains error details if the connection attempt fails.
Return Value
Type: System.Boolean
true if the connection succeeded; otherwise, false.
See Also
TestConnection Overload
CimSession Class
Microsoft.Management.Infrastructure Namespace
Return to top