基本語法:
net share sharename=folderpath /grant:username,permissions sharename: 要創建的共享名稱 username : 可以訪問共享該文件夾的用戶ID permission: 訪問共享文件夾的權限:Read, Change or Full
比如:
與域中的每個人共享文件夾E:\Documents並授予完全權限
net share Docs=E:\Documents /grant:everyone,FULL
如果允許多個用戶訪問共享,則可以限制同時訪問共享的用戶數量。這將防止對系統的性能影響。以下命令將限制設置為10個用戶
net share Docs=E:\Documents /grant:everyone,FULL /users:10
與特定用戶共享並僅授予讀取權限的命令
net share Docs=E:\Documents /grant:username,READ
刪除共享
net share sharename /delete
查看共享
net share