How to Automatically Publish Shares & Printers

D

DJ Schweiger

I know how to manually create the share and Printer
objects within Active Directory.

I'm looking for a way that will automatically detect the
shares on some servers and publish them in active
directory.

I want to double click on Network Neighborhood, double
click on Directory double click on the appropriate OU and
see the share & printers.
 
K

Klaas J.M. Langhout [MS]

I suspect someone has already done this but, a vbscript could be written
that either runs in a batch mode by a domain admin or, as part of the logon
script (in the users context) if they have been given rights to publish this
info in the AD to do this.

The psuedo code for a batch script would be:

- enumerate some set of machines (within AD).
- for each,
- if can connect
- if any shares set up
-publish the share
end if
end if
end for

There is a script to do the actual publishing at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;234582&Product=win2000
There's also a fair amount of samples floating around about ADSI to do the
other parts of the pseudo code above.

Hope this helps, klaas
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top