0

https://support.microsoft.com/en-us/kb/295622I am on computer A running Win server 2012. There is a folder on 38 other computers (B1, B2, B3, ..., B38 - each running Win 7) that I want to share. Isn't there a command line command I can run from computer A that will share the folders on computers B1, B2, etc.?

I have done this before but it's been over a year and I can't remember how I did it. I think it might've been icacls or subinacl, but I tried both and neither worked. But I might not be putting in the right command-line arguments.

Also, would the account running the program need to be a domain administrator?

Clarification edit: The folder I want to share is on the REMOTE computer, not the local computer. I want to use the local computer to share the folder on the remote computer. I know you can use WMIC to do it (https://support.microsoft.com/en-us/kb/295622 - just change the node to remote IP), but WMIC can only make the folder shared. It won't let you change the permissions on the folder once it's shared, which is kind of pointless. I'm sure I used either icacls or subinacl before, but they don't work now. The account I used before was a domain admin, but I can't access that one now. I don't know if that matters.

raphael75
  • 2,982
  • 4
  • 29
  • 44
  • Possible duplicate of [How can I create a shared folder from the Windows command line?](http://stackoverflow.com/questions/1537065/how-can-i-create-a-shared-folder-from-the-windows-command-line) – Devendra Bhatte Mar 17 '16 at 12:00

2 Answers2

0

Use net share myshare=C:\Users\Myname

See https://technet.microsoft.com/en-us/library/cc770880.aspx for more details

Devendra Bhatte
  • 358
  • 4
  • 18
  • 1
    The folder I want to share is on the REMOTE computer, not the local computer. I want to use the local computer to share the folder on the remote computer. I know you can use WMIC to do it (https://support.microsoft.com/en-us/kb/295622 - just change the node to remote IP), but WMIC can only make the folder shared. It won't let you change the permissions on the folder once it's shared, which is kind of pointless. I'm sure I used either icacls or subinacl before, but they don't work now. The account I used before was a domain admin, but I can't access that one now. I don't know if that matters. – raphael75 Mar 17 '16 at 12:30
0

There is a way for this task but doing that on 38 PC clients may be a bit boring job! However, it can solve the problem of sharing a folder on a remote pc with assigning permission on each one. As a network Admin, follow the below steps:

  1. Run "Computer Management" console (or type "compmgmt.msc" on run and enter)
  2. Chose the "Connect to another computer" option on Action menu
  3. Type your client name or IP address to connect.
  4. After success connecting, go "System Tools\Shared Folders\Shares"
  5. Select "New Share" from the "Action" menu
  6. Follow the "Shared Folder" wizard steps to select folder path and name to shar
  7. The final wizard step is the "Shared Folder Permission" page with "Custom Permissions" option
  8. Click on the "Custom" button to define shared folder's "Share and NTFS" permission base on remote pc environment.

See the "Shared Folder Permission Wizard Page" Image

enter image description here

Bobbiz
  • 43
  • 1
  • 4