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

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 in the list.

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

PS C:\> Add-ClusterResourceDependency -Cluster "FileServer-(cluster1FS12)(Cluster Disk 2)" -Resource "Cluster Disk 4"
Name                State               Group               ResourceType 
----                -----               -----               ------------ 
FileServer-(clus... Online              cluster1FS12        File Server

This example adds the resource named Cluster Disk 4 to the list of resources on which the resource called FileServer-(cluster1FS12)(Cluster Disk 2) depends, using AND as the connector.

Optional 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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies the cluster resource for which to add the dependency.

Type:PSObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Provider

Specifies the cluster resource on which to add a dependency.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Resource

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

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.FailoverClusters.PowerShell.ClusterResource

Outputs

Microsoft.FailoverClusters.PowerShell.ClusterResource