I am attempting to create shares and assign permissions from the command line.(actually from a batch file) When we used machine local groups I was able to use net share and cacls with no problems. The syntax was as follows:
cacls e:\shares\FolderName /T /E /G ServerName\MachineLocalRWGroup:C ServerName\MachineLocalROGroup:R ServerName\administrators:F
net share Sharename=e:\shares\FolderName /grant:Administrators,full /grant:MachineLocalRWGroup,change /grant:MachineLocalROGroup,read
We've since moved to using AD Domain Local Groups and I can't seem to get the syntax right (or it can't be done using net share and calcs) Can someone out there please point me in the right direction?