Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetRelated Method (String, String, String, String, String, String, Boolean, EnumerationOptions)

ManagementObject.GetRelated Method (String, String, String, String, String, String, Boolean, EnumerationOptions)

.NET Framework 1.1

Gets a collection of objects related to the object (associators).

[Visual Basic]
Overloads Public Function GetRelated( _
   ByVal relatedClass As String, _
   ByVal relationshipClass As String, _
   ByVal relationshipQualifier As String, _
   ByVal relatedQualifier As String, _
   ByVal relatedRole As String, _
   ByVal thisRole As String, _
   ByVal classDefinitionsOnly As Boolean, _
   ByVal options As EnumerationOptions _
) As ManagementObjectCollection
[C#]
public ManagementObjectCollection GetRelated(
 string relatedClass,
 string relationshipClass,
 string relationshipQualifier,
 string relatedQualifier,
 string relatedRole,
 string thisRole,
 bool classDefinitionsOnly,
 EnumerationOptions options
);
[C++]
public: ManagementObjectCollection* GetRelated(
 String* relatedClass,
 String* relationshipClass,
 String* relationshipQualifier,
 String* relatedQualifier,
 String* relatedRole,
 String* thisRole,
 bool classDefinitionsOnly,
 EnumerationOptions* options
);
[JScript]
public function GetRelated(
   relatedClass : String,
 relationshipClass : String,
 relationshipQualifier : String,
 relatedQualifier : String,
 relatedRole : String,
 thisRole : String,
 classDefinitionsOnly : Boolean,
 options : EnumerationOptions
) : ManagementObjectCollection;

Parameters

relatedClass
The class of the related objects.
relationshipClass
The relationship class of interest.
relationshipQualifier
The qualifier required to be present on the relationship class.
relatedQualifier
The qualifier required to be present on the related class.
relatedRole
The role that the related class is playing in the relationship.
thisRole
The role that this class is playing in the relationship.
classDefinitionsOnly
When this method returns, it contains only class definitions for the instances that match the query.
options
Extended options for how to execute the query.

Return Value

A ManagementObjectCollection containing the related objects.

Remarks

This operation is equivalent to an ASSOCIATORS OF query where ResultClass = <relatedClass>.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ManagementObject Class | ManagementObject Members | System.Management Namespace | ManagementObject.GetRelated Overload List

Show:
© 2015 Microsoft