• RSS
  • Twitter
  • FaceBook

A Quick Tip To Create Shared Folders Remotely

  • Section(s): Administrator, Admin , Admin
  • Published on Dec 07, 2010.
  • Last Modified on Oct 31, 2009.
  • Last Modified by Nirmal Sharma.
  • Rating: Not Rated
This article explains how you can create shared folders remotely on remote computers.

You can use Resource Kit tool called; rmtshare.exe to create shared folders remotely. You need to use three commands as mentioned below:

  • MD command to create a directory on the remote computer
  • Rmtshare.exe command to share the directory
  • Xcacls.vbs to assign permissions on the shared folder.

This is how you do it. You need to create a folder called; Incoming on C:\ drive on all the client computers. This folder is used by the Antivirus Server to store the updates and client version of Antivirus, running on client computers, pulls the updates from Incoming directory. You have found that the Incoming folder is no longer shared. You can create a small script to share this folder on all the computers in your environment:

Steps:

  • Create a text file: CompList.TXT
  • Put all the client computer names in this file
  • Next, put the following commands in a file and save it as Share.CMD
  • ***START HERE*** 
  • @ Echo Off
  • setlocal enabledelayedexpansion
  • FOR /F "Tokens=*" %%L IN (CompList.TXT) DO (
  •    SET CompName=
  •    SET CompName=%%L
  •    MD \\!CompName!\C$\Incoming
  •    Rmtshare.exe \\!CompName!\Incoming$ = C:\Incoming
  •    Xcacls.VBS \\!CompName!\Incoming$ "DomainName.Com/Domain Admins":F
  • )
  • ***END HERE***

Now, run the Share.CMD from a computer which has access to all the computers mentioned in the CompList.TXT. The script runs against each computers mentioned in the CompList.TXT and execute the commands to create, share and assign the Full Control permissions to Domain Admins Security Group to share Incoming$ on all the computers.

 

About Nirmal Sharma

Nirmal is a Microsoft MVP in Directory Services and working as a Technical Architect/Consultant. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating Systems and software. He is specialized in Directory Services, Microsoft Clustering, SQL, MOM, Exchange and Citrix. In his spare time, he likes to help others and write "internal" technical articles, white papers and tips on various Microsoft technologies. You can contact him at nirmal_sharma@mvps.org.


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?