Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Is 3rd party software an option? If so maybe this helps you: helgeklein.com/setacl –  Marcel Janus Nov 16 '13 at 15:56
add comment

2 Answers

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.

share|improve this answer
add comment

You can do this with the PowerShell cmdlets Grant-SmbShareAccess and Revoke-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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.