Publishing a Shared Folder in Windows 2000 Active Directory (234582)



The information in this article applies to:

  • Microsoft Windows NT Server 4.0 Terminal Server Edition
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server

This article was previously published under Q234582

SUMMARY

You can publish any shared network folder, including a distributed file system (Dfs) folder, in Active Directory. Creating a Shared folder object in Active Directory does not automatically share the folder. It is a two-step process; you must first share the folder, and then publish it in Active Directory.

MORE INFORMATION

To share a folder:
  1. Use Windows Explorer or the command prompt to create a new folder named TestShare on one of your disks.
  2. In Windows Explorer, right-click the folder, click Properties, click the Sharing tab, and then click Shared As.
  3. In the Share Name box, type TestShare.
  4. Click OK.
  5. Populate the folder with files such as documents, spreadsheets, or presentations.
To publish the shared folder in Active Directory:
  1. Click Start, click Run, type dsa.msc, and then click OK to start the Active Directory Users and Computers snap-in.
  2. Double-click the Domain object, and then select the Organizational Unit (OU) in which you want to publish the share, or create a new OU. (To create a new OU, right-click the Domain object, point to New, and then click Organizational Unit. Name the New OU TestOU.)
  3. Click OK.
  4. Right-click the TestOU organizational unit, or the OU you selected, point to New, and then click Shared Folder.
  5. In the Name box, type Published Test Share.
  6. In the UNC Path box, type \\yourcomputername\TestShare. For example, type \\Server.domainname.com\TestShare or \\server\TestShare.
  7. If you want to publish a Dfs root, type \\domainname\rootname. For example, type \\domainname.com\dfsrootname.
For additional information about Dfs, click the article number below to view the article in the Microsoft Knowledge Base:

241452 Installing the Distributed File System on Windows 2000

Users can see this volume while browsing Active Directory. To browse Active Directory:
  1. On the desktop, double-click Network Neighborhood or My Network Places.
  2. Double-click Entire Network.
  3. Click Entire Contents.
  4. Double-click Directory.
  5. Double-click the domain name, and then double-click TestOU.
  6. To view the files in the volume, either right-click the Published TestShare volume and then click Open, or double-click Published TestShare.
To search Active Directory for published shares:
  1. On the desktop, double-click Network Neighborhood or My Network Places.
  2. Double-click Entire Network.
  3. Click Entire Contents.
  4. Double-click Directory.
  5. Right-click the domain, and then click Find.
  6. In the Find box, click Shared Folders.
  7. In the Named box, type the name of the shared folder you want to find.
  8. Click Find Now.
  9. To view the files in the volume, either right-click the Published TestShare volume and then click Open, or double-click Published TestShare.


To publish a share with a VBScript you can modify the following code:
'==========================================================================
' AUTHOR: Stuart Hudman, Microsoft PSS
' DATE : 1st March 2001
' KEYWORDS : AD publish file share

'==========================================================================

Dim shareloc, ou, vol
Set ou = GetObject("LDAP://OU=testou, DC=domainname,DC=com")
'The cn below needs to be specified as it is a mandatory attribute
Set vol = ou.Create("volume", "cn=Sales Share")

'Below are the variables to point and describe the actual share point
shareloc = "\\servername\sharelocation"
desc = "This stores all docs for the Sales employees"

vol.Put "uncName", shareloc
vol.Put "Description", desc
vol.SetInfo


Modification Type:MajorLast Reviewed:6/28/2004
Keywords:kbenv kbhowto KB234582