I am trying to grant access rights to a domain user in a batch file like this:
net share sharename=c:\dir /GRANT:\domain\username,FULL
But it fails. I can only grant rights to local users. Is there a way to grant rights to domain users with net share? If not, how can I do so in a batch file?