I used the following to create a folder share called "Running Virtual Machines" on a Hyper V R2 server:
net share "Running Virtual Machines"="C:\Hyper V\Running Virtual Machines"
Now I need to change the permissions on the share to allow users to access the share but using the following gives me the error "You used an option with an invalid value":
net share "Running Virtual Machines" /GRANT:domain/username,FULL
I have also tried:
net share "Running Virtual Machines"="C:\Hyper V\Running Virtual Machines" /GRANT:domain\username,FULL
This gives me the message "The name has already been shared."
How do I change permissions on an existing folder share from the command line without having to delete the share and recreate it?
You can do this with the PowerShell cmdlets
Grant-SmbShareAccess
andRevoke-SmbShareAccess
There are some examples in this TechNet blog post: http://blogs.technet.com/b/omers/archive/2013/09/14/assigning-file-share-permissions-using-power-shell.aspx
You may be able to make use of the RMTSHARE utility, but it's an old program so you'll want to test thoroughly for your Windows Server 2008 environment. You might have to disable UAC for it to work properly.