Add \ Remove Permissions From SMB File Share On Nano Server 20106 Using PowerShell

After creating a local users accounts on my Windows Nano Server 2016 File Server, Today I’ll show how I add and remove permissions from SMB Share using PowerShell.

If you haven’t setup your Nano Server use my article on how to Install And Run Nano Server Technical Preview 5.

Once your Nano Server Is Configured Connect to It using PowerShell Direct, Connect To A Nano Server Using PowerShell Direct or using PowerShell Remoting How To Connect To A Windows Nano Server Using PowerShell.

To view my SMB Share I use the cmdlet below:

Get-SmbShareAccess mydata |fl

To give Ben.Sphere’s Full access permissions to my SMB File Share I use the cmdlet:

Grant-SmbShareAccess -Name Mydata -AccountName ben.sphere -AccessRight Full -Verbose

To view the permissions after I use:

Get-SmbShareAccess mydata |fl

To remove Ben’s access permissions from my Share I use:

revoke-SmbShareAccess -Name Mydata -AccountName ben.sphere

Posted

in

by