Add-ClusterResource

Add-ClusterResource

Add a resource to a clustered service or application (resource group) in a failover cluster.

Syntax

Add-ClusterResource [-InputObject <psobject>] [-Name] <string> [-ResourceType] <string> [[-Group] <string>] [-Cluster <string>] [<CommonParameters>]
  • InputObject

  • Name

  • ResourceType

  • Group

  • Cluster

Detailed Description

Before adding the resource, you need to obtain the resource type and the name of the group that you want to add the resource to.

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

Group

Specifies the name of the cluster group where the new resource is added.

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

InputObject

Specifies the cluster group where the new resource is added.

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

Name

Specifies the name of the cluster resource to create.

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

true

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

ResourceType

Specifies the name of the cluster resource type for the new cluster resource. [Alias: restype type]

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

3

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Input Type

Microsoft.FailoverClusters.PowerShell.ClusterGroup

Return Type

Microsoft.FailoverClusters.PowerShell.ClusterResource

Examples

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

Command Prompt: C:\PS>

 
Add-ClusterResource -Name resource1 -ResourceType "IP Address" -Group ClusterSrv1 
 
Name                State               Group               ResourceType 
----                -----               -----               ------------ 
resource1           Offline             ClusterSrv1         IP Address

Description

-----------

This command creates a new IP Address resource called resource1 on the local cluster. It configures the resource as part of the clustered server (resource group) called ClusterSrv1.

See Also

Reference

Get-ClusterResource
Move-ClusterResource
Remove-ClusterResource
Resume-ClusterResource
Start-ClusterResource
Stop-ClusterResource
Suspend-ClusterResource

Other Resources

Online version: