create windows network share from command line 1

create windows network share from command line

net share sharename=folderpath /grant:username,permissions

sharename: You can assign name to the share you are going to create
username : Login id of the user whom you want to share the folder with
permission: Read, Change or Full

Here is what the above code is Doing:
1. It is creating a folder in the C drive with the name “SharedFolder”
2. It is sharing the folder with the name “SharedFolder”
3. It is granting the user “username” with the permission “Full”

Similar Posts