This documentation is archived and is not being maintained.

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
public ManagementObjectCollection GetRelated(
 string relatedClass,
 string relationshipClass,
 string relationshipQualifier,
 string relatedQualifier,
 string relatedRole,
 string thisRole,
 bool classDefinitionsOnly,
 EnumerationOptions options
public: ManagementObjectCollection* GetRelated(
 String* relatedClass,
 String* relationshipClass,
 String* relationshipQualifier,
 String* relatedQualifier,
 String* relatedRole,
 String* thisRole,
 bool classDefinitionsOnly,
 EnumerationOptions* options
public function GetRelated(
   relatedClass : String,
 relationshipClass : String,
 relationshipQualifier : String,
 relatedQualifier : String,
 relatedRole : String,
 thisRole : String,
 classDefinitionsOnly : Boolean,
 options : EnumerationOptions
) : ManagementObjectCollection;


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

Return Value

A ManagementObjectCollection containing the related objects.


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


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