Edit

Share via


Add-ClusterResourceDependency

Adds a resource to the list of resources on which a particular resource depends, using AND as the connector, within a failover cluster.

Syntax

Default (Default)

Add-ClusterResourceDependency
    [[-Resource] <String>]
    [[-Provider] <String>]
    [-InputObject <PSObject>]
    [-Cluster <String>]
    [<CommonParameters>]

Description

The Add-ClusterResourceDependency cmdlet adds a resource to the list of resources on which a particular resource depends, using AND as the connector, within a failover cluster. Existing dependencies will remain on the list. If you specify the InputObject parameter, the Resource parameter will be ignored.

A dependent resource is brought online after the resources on which it depends. A dependent resource is taken offline before the resources on which it depends.

Examples

Example 1

Add-ClusterResourceDependency -Resource "FileServer-(cluster1FS12)" -Provider "Cluster Disk 4"

This example adds the resource named Cluster Disk 4 to the list of resources on which the resource called FileServer-(cluster1FS12) depends.

Parameters

-Cluster

Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is . or it is omitted, then the cmdlet runs on the local cluster.

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

-InputObject

Specifies the cluster resource for which to add the dependency.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Provider

Specifies the cluster resource to add as a dependency.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Resource

Specifies the name of the cluster resource for which to add the dependency.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
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.

Inputs

Microsoft.FailoverClusters.PowerShell.ClusterResource

Outputs

Microsoft.FailoverClusters.PowerShell.ClusterResource