Remove-ClusterGroup
Remove-ClusterGroup
Removes a clustered role, also called a resource group, from a failover cluster.
Syntax
Parameter Set: InputObject
Remove-ClusterGroup [[-Name] <StringCollection> ] [-Cluster <String> ] [-Force] [-InputObject <PSObject> ] [-RemoveResources] [ <CommonParameters>]
Detailed Description
The Remove-ClusterGroup cmdlet removes a clustered role. also called a resource group, from a failover cluster.
Use this cmdlet to delete a group. If the group still has resources in it, then either remove the resources first, or specify the RemoveResources parameter.
Parameters
-Cluster<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Force
Runs the cmdlet without prompting for confirmation. By default the cmdlet will ask for confirmation from the user before proceeding.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-InputObject<PSObject>
Specifies the clustered role to remove.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Name<StringCollection>
Specifies the name of the clustered role to remove.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RemoveResources
Causes the cmdlet to delete all resources in the clustered role before removing the clustered role.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- Microsoft.FailoverClusters.PowerShell.ClusterGroup
Outputs
The output type is the type of the objects that the cmdlet emits.
- None
Examples
EXAMPLE 1
This example prompts the user for confirmation and then removes the clustered role named MyFileServer, if the resources have first been removed from it.
PS C:\> Remove-ClusterGroup –Name MyFileServer
EXAMPLE 2
This example removes the clustered role named MyFileServer, if the resources have first been removed from it. The cmdlet does not prompt for confirmation.
PS C:\> Remove-ClusterGroup –Name MyFileServer -Force
EXAMPLE 3
This example removes the clustered role named MyFileServer, without prompting for confirmation. All cluster resources in MyFileServer will be deleted.
PS C:\> Remove-ClusterGroup –Name MyFileServer -Force -RemoveResources