Page 1 of 1 1
Topic Options
#141289 - 2005-06-08 03:30 PM Manipulating DFS
Breaker Offline
Hey THIS is FUN
*****

Registered: 2001-06-15
Posts: 268
Loc: Yorkshire, England
Does anyone know of any way to manipulate a domain DFS root programmatically other than by shelling out to DFSCMD.EXE?

I am trying to create a script that will modify the targets of our DFS links, and the obvious way to do it is to add the new target and remove the old one, which is perfectly simple to do with DFSCMD.EXE, using the /ADD and /REMOVE switches.

However, I've noticed in the DFS MMC console that it's possible to enable and disable particular targets of a link, without necessarily removing them - and wondered if anyone knew of a scriptable way to do this, as it would be preferable for me if it can be done.

I'm having a hunt on MSDN for possible WMI/ADSI based methods for DFS manipulation, but any advice would be appreciated.
_________________________
================================================
Breaker


Top
#141290 - 2005-06-09 12:48 AM Re: Manipulating DFS
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
What about this:
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/disk/dfs/
_________________________
There are two types of vessels, submarines and targets.

Top
#141291 - 2005-06-09 04:28 PM Re: Manipulating DFS
Breaker Offline
Hey THIS is FUN
*****

Registered: 2001-06-15
Posts: 268
Loc: Yorkshire, England
Sadly, WMI only exposes the Win32_DFS* objects in Win2003 Server - and I'm playing with Win2000. I had found some docs on MSDN about these new classes, but they don't really apply to me.

Never mind - the script I have is happily working, shelling out to DFSCMD.EXE, but it feels like it would have been better to COM this somehow - just not possble unless I upgrade my DFS servers to Win2003. Hmm...tempting...
_________________________
================================================
Breaker


Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.073 seconds in which 0.047 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org