Get-SCRelationshipInstance
Gets an instance of a class relationship in System Center Operations Manager.
Syntax
Get-SCRelationshipInstance
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
Get-SCRelationshipInstance
[-Id] <Guid[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
Get-SCRelationshipInstance
[[-SourceInstance] <EnterpriseManagementObject[]>]
[[-TargetInstance] <EnterpriseManagementObject[]>]
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
The Get-SCRelationshipInstance cmdlet gets an instance of a class relationship in System Center Operations Manager. This command can also be executed with Get-SCOMRelationshipInstance
.
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 the relationship instance using its ID
PS C:\>Get-SCRelationshipInstance -Id "C434222E-CFED-F457-4E88-C55C0430B69A"
Gets a particular relationship instance using its ID.
2: Get the relationship instance using the Notifications resource pool
PS C:\> $NotificationsResourcePool = Get-SCOMClassInstance -DisplayName "Notifications Resource Pool"
PS C:\> $NotificationsSubscriptionServer = Get-SCOMClassInstance -DisplayName "Alert Notification Subscription Server"
PS C:\> Get-SCRelationshipInstance -SourceInstance $NotificationsResourcePool -TargetInstance $NotificationsSubscriptionServer
Gets the relationship instances using its source and target instances.
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
-Id
Type: Guid [ ]
Position: 1
Default value: None
Required: True
Accept pipeline input: True
Accept wildcard characters: False
-SCSession
Type: Connection [ ]
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
-SourceInstance
Type: EnterpriseManagementObject [ ]
Position: 1
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
-TargetInstance
Type: EnterpriseManagementObject [ ]
Position: 2
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False