Edit

Share via


Block-ClusterAccess

Prevents the specified user or users from accessing a failover cluster.

Syntax

Default (Default)

Block-ClusterAccess
    [-User] <StringCollection>
    [-InputObject <PSObject>]
    [-Cluster <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Block-ClusterAccess cmdlet prevents the specified user or users from accessing a failover cluster. If you don't want to completely block access and instead want to limit a user to using Windows PowerShell to view cluster settings (not change settings), then use the Grant-ClusterAccess cmdlet with the Readonly parameter.

Examples

Example 1

Block-ClusterAccess -User contoso\johnj99

This example prevents the user named johnj99 on the contoso ___domain from gaining access to the local cluster.

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies the cluster on which to block access for the given user.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-User

Specifies the user for whom to block cluster access.

Parameter properties

Type:StringCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet isn't run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.FailoverClusters.PowerShell.Cluster