PowerShell Logo Small

Revoke-SmbShareAccess



This is the built-in help made by Microsoft for the command 'Revoke-SmbShareAccess', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Removes all of the allow access control entries (ACEs) for a trustee from the security descriptor of the Server Message Block (SMB) share.

SYNTAX


Revoke-SmbShareAccess [-Name] <String[]> [[-ScopeName] <String[]>] [-AccountName <String[]>] [-AsJob] [-CimSession <CimSession[]>] [-Force] [-ThrottleLimit <Int32>]
[-Confirm] [-WhatIf] [<CommonParameters>]
Revoke-SmbShareAccess [-AccountName <String[]>] [-AsJob] [-CimSession <CimSession[]>] [-Force] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Revoke-SmbShareAccess cmdlet removes all of the allow access control entries (ACEs) for a trustee from the security descriptor of the Server Message Block (SMB) share.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=289698
Block-SmbShareAccess
Get-SmbShareAccess
Grant-SmbShareAccess
Unblock-SmbShareAccess

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Revoke-SmbShareAccess -Name VMFiles -AccountName "Domain Admins"
Confirm
Are you sure you want to perform this action?
Performing operation 'Modify' on Target 'Contoso-SO,VMFiles'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y

Name ScopeName AccountName AccessControlType AccessRight
---- --------- ----------- ----------------- -----------
VMFiles Contoso-SO Contoso\Administrator Allow Full
VMFiles Contoso-SO Contoso\Contoso-HV1$ Allow Full
VMFiles Contoso-SO Contoso\Contoso-HV2$ Allow Full



This example removes all of the allow ACEs for a trustee from the security descriptor of the SMB share named VMFiles.




EXAMPLE 2

PS C:\>Revoke-SmbShareAccess -Name VMFiles -AccountName Contoso\Contoso-HV2$ -Force

Name ScopeName AccountName AccessControlType AccessRight
---- --------- ----------- ----------------- -----------
VMFiles Contoso-SO Contoso\Administrator Allow Full
VMFiles Contoso-SO Contoso\Contoso-HV1$ Allow Full



This example removes all of the allow ACEs for a trustee from the security descriptor of the SMB share named VMFiles without user confirmation.