Would you like to react to this message? Create an account in a few clicks or log in to continue.

Net Share Commands

Go down

Net Share Commands Empty Net Share Commands

Post by sunt Fri May 17, 2019 10:59 am

https://www.windows-commandline.com/list-create-delete-network-shares/
Net share command: List / create / delete network shares from command line
by SRINI

We can use net share command to create, configure and delete network shares from command line . Below you can find syntax and examples for net share command.

Create a network share from command line

The syntax for creating a share is as follows.

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
For example to share the folder E:\Docs with everyone in the domain and to give full permissions

net share Docs=E:\Documents /grant:everyone,FULL
If you are allowing multiple users to access the share, you can limit the number of users accessing the share simultaneously. This will prevent performance impact on your system. The below command will set the limit to 10 users.

net share Docs=E:\Documents /grant:everyone,FULL  /users:10
Command to share with a specific user and to grant only read rights:

net share Docs=E:\Documents /grant:username,READ

Delete network share(i.e to disable sharing of the folder) from command line
net share sharename /delete

For example, to delete the share created above, the command would be as below.
net share docs /delete

Alternatively, we can use the folder physical location also to disable sharing
net share E:\Docs /delete

List the shared created on the local computer
net share

Delete the share on a remote computer
net share sharename \\remotepc /delete
sunt
sunt

Number of posts : 145
Registration date : 2008-11-14

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum