Add-ClusterResource
Adds a resource to a clustered role, or resource group, in a failover cluster.
Syntax
Add-ClusterResource
[-Name] <String>
[[-Group] <String>]
[-ResourceType] <String>
[-SeparateMonitor]
[-InputObject <PSObject>]
[-Cluster <String>]
[<CommonParameters>]
Description
The Add-ClusterResource cmdlet adds a resource to a clustered role, or resource group, in a failover cluster. Before adding the resource, obtain the resource type and the name of the group to which to add the resource.
Examples
Example 1
PS C:\> Add-ClusterResource -Name resource1 -ResourceType "IP Address" -Group ClusterSrv1
Name State Group ResourceType
---- ----- ----- ------------
resource1 Offline ClusterSrv1 IP Address
This example creates a new IP Address resource called resource1 on the local cluster. The cmdlet configures the resource as part of the clustered role, or resource group, called ClusterSrv1.
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Group
Specifies the name of the clustered role where the new resource is added.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specifies the clustered role where the new resource is added.
Type: | PSObject |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the cluster resource to create.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceType
Specifies the name of the cluster resource type for the new cluster resource.
Type: | String |
Aliases: | ResType, Type |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SeparateMonitor
Specifies that the new resource should run in a separate resource monitor.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.FailoverClusters.PowerShell.ClusterGroup
Outputs
Microsoft.FailoverClusters.PowerShell.ClusterResource