Remove-SqlMonitorAccessRight
Published 29 August 2023
Removes access rights from Principals.
Syntax
Remove-SqlMonitorAccessRight -Principals <Principal[]> -MonitoredObjects <MonitoredObject[]> [-Groups <Group[]>] [<CommonParameters>] Remove-SqlMonitorAccessRight -Principals <Principal[]> -Groups <Group[]> [<CommonParameters>]
Description
The Remove-SqlMonitorAccessRight cmdlet removes access of a user, as represented by an Principal object to monitored entities or groups
Connect-SqlMonitor must be called before this cmdlet. Update-SqlMonitorPrincipal should be called to communicate the changes to SQL Monitor.
Parameters
-Principals
<Principal[]>
The principals to remove rights for.
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | True (ByValue) |
Accept Wildcard Characters | false |
-Groups
<Group[]>
The groups to remove rights to. At least one of Groups and MonitoredObjects must be specified.
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-MonitoredObjects
<MonitoredObject[]>
The monitored objects (outside specified groups) to remove rights to. At least one of Groups and MonitoredObjects must be specified.
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-ProgressAction
<ActionPreference>
{{ Fill ProgressAction Description }}
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 http://technet.microsoft.com/en-us/library/hh847884.aspx.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
-
None.
You cannot pipe input to this cmdlet.
Examples
-------------------------- EXAMPLE 1 --------------------------
$Principals = $Principals | Remove-SqlMonitorAccessRight -Groups $Group $Principals | Update-SqlMonitorPrincipal