Change Windows network share permissions from command line

Grant-SmbShareAccess -Name ShareName -AccountName Administrators -AccessRight Full -Force
Grant-SmbShareAccess -Name "Brother DW2710 series" -AccountName Everyone -AccessRight Change -Force

It appears that there is no pre-existing command line tool for managing permissions on existing shares beyond the initial setup. However, you can accomplish multiple grants if temporarily taking the shares offline is not a concern. In such a case, you have the option to utilize the following approach:

NET SHARE ShareName /DELETE /Y
NET SHARE ShareName=C:\TempShare /GRANT:Everyone,Change /GRANT:Administrators,Full /UNLIMITED

Published by

Rich

Just another IT guy.

Leave a Reply

Your email address will not be published. Required fields are marked *