Add-ClusterResourceDependency

Add-ClusterResourceDependency

Add a resource to the list of resources that a particular resource depends on (using AND as the connector) within a failover cluster. Existing dependencies will remain in the list.

Syntax

Add-ClusterResourceDependency [-InputObject <psobject>] [[-Resource] <string>] [[-Provider] <string>] [-Cluster <string>] [<CommonParameters>]
  • InputObject

  • Resource

  • Provider

  • Cluster

Detailed Description

A dependent resource is brought online after the resources that it depends on. Likewise, a dependent resource is taken offline before the resources that it depends on.

Parameters

Cluster

Specifies the name of the cluster to run this cmdlet on. If you type "-Cluster ." or omit the parameter, the cmdlet runs on the local cluster.

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

InputObject

Specifies the cluster resource to add the dependency for.

Default Value: **

Data Type: psobject

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

true (ByValue)

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Provider

Specifies the cluster resource to add a dependency on.

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

2

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Resource

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

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

1

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Input Type

Microsoft.FailoverClusters.PowerShell.ClusterResource

Return Type

Microsoft.FailoverClusters.PowerShell.ClusterResource

Examples

-------------------------- EXAMPLE 1 --------------------------

Command Prompt: C:\PS>

 
Add-ClusterResourceDependency "FileServer-(cluster1FS12)(Cluster Disk 2)" "Cluster Disk 4" 
 
Name                State               Group               ResourceType 
----                -----               -----               ------------ 
FileServer-(clus... Online              cluster1FS12        File Server                        

Description

-----------

This command adds the resource Cluster Disk 4 to the list of resources that resource "FileServer-(cluster1FS12)(Cluster Disk 2)" depends on (using AND as the connector).

See Also

Reference

Get-ClusterResourceDependency
Remove-ClusterResourceDependency
Set-ClusterResourceDependency
Get-ClusterResourceDependencyReport

Other Resources

Online version: