Get-SCRelationshipInstance
Gets an instance of a class relationship in System Center Operations Manager.
Syntax
Empty (Default)
Get-SCRelationshipInstance
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
FromRelationshipInstanceId
Get-SCRelationshipInstance
[-Id] <Guid[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
FromRelationshipInstanceSourceTarget
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
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
.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Credential
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
.
Parameter properties
Type: | PSCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Id
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
.
Parameter properties
Type: | Guid[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromRelationshipInstanceId
Position: | 1 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SCSession
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
.
Parameter properties
Type: | Connection[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourceInstance
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
.
Parameter properties
Type: | EnterpriseManagementObject[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromRelationshipInstanceSourceTarget
Position: | 1 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetInstance
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
.
Parameter properties
Type: | EnterpriseManagementObject[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromRelationshipInstanceSourceTarget
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.