Windows Server 2016 – SMB set share permissions with PowerShell

get-smbshareaccess -name share  #you can see the access list for "share"

, <span>Windows Server 2016 –  SMB set share permissions with PowerShell</span>, KandZ

###remove all access for "everyone" from "share
revoke-smbshareaccess -name share -accountname everyone

, <span>Windows Server 2016 –  SMB set share permissions with PowerShell</span>, KandZ

###grant full access to "everyone"  for "share"
grant-smbshareaccess -name share -accountname everyone -accessright full

, <span>Windows Server 2016 –  SMB set share permissions with PowerShell</span>, KandZ

### Deny access 
block-smbshareaccess -name share -accountname everyone

, <span>Windows Server 2016 –  SMB set share permissions with PowerShell</span>, KandZ

### Remove any access 
unblock-smbshareaccess -name share -accountname everyone

, <span>Windows Server 2016 –  SMB set share permissions with PowerShell</span>, KandZ

 

 

26800cookie-checkWindows Server 2016 – SMB set share permissions with PowerShellWindows Server 2016 – SMB set share permissions with PowerShell

Related posts

Leave a Comment