Get-SCRelationship

Gets a class relationship in System Center Operations Manager.

Syntax

Get-SCRelationship
   [[-Source] <ManagementPackClass[]>]
   [[-Target] <ManagementPackClass[]>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCRelationship
   [-DisplayName] <String[]>
   [[-Source] <ManagementPackClass[]>]
   [[-Target] <ManagementPackClass[]>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCRelationship
   [-Id] <Guid[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCRelationship
   [-ManagementPack] <ManagementPack[]>
   [[-Source] <ManagementPackClass[]>]
   [[-Target] <ManagementPackClass[]>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCRelationship
   [-Name] <String[]>
   [[-Source] <ManagementPackClass[]>]
   [[-Target] <ManagementPackClass[]>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

The Get-SCRelationship cmdlet gets a class relationship in System Center Operations Manager. This command can also be executed with Get-SCOMRelationship.

By default, this cmdlet uses the active persistent connection to a management group. Use the SCSession parameter to specify a different persistent connection. You can create a temporary connection to a management group by using the ComputerName and Credential parameters. For more information, type Get-Help about_OpsMgr_Connections.

Examples

1: Get an object relationship using its Display ID

PS C:\>Get-SCRelationship -Id "FDD1EEB6-E022-761C-58F1-8AFD88FFAA88"

Gets the relationship between two objects, using the ID of the respective relationship.

2: Get an object relationship using its Display Name

PS C:\>Get-SCRelationship -Name "Microsoft.Windows.ComputerHostsOperatingSystem"

Gets the relationship between two objects, using the Name of the respective relationship.

Parameters

-ComputerName

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Type:String[]
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:True

-Id

Type:Guid[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ManagementPack

Type:ManagementPack[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Type:String[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-SCSession

Type:Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Source

Type:ManagementPackClass[]
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Target

Type:ManagementPackClass[]
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False