Lists all of the DFS links under a DFS root that is hosted by a particular storage server or domain.
wntDfsList( DFS name )
(s) DFS name: A domain name or a server name in UNC format. Must have a leading "\\".
(s) A @TAB delimited list containing the names of all of the DFS link names.
This function will return a @TAB delimited list of all of the DFS links that are hosted by a particular server [standalone] or domain [AD environment on Win2K or newer].
Traditional standalone DFS links are listed by specifying the name of the server on which they are hosted.
DFS links that are hosted by the AD directory service are listed by specifying the name of the domain.
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
DFSname = "\\computer" dsflist = wntDfsList( DFSname ) DFSPath = AskItemlist("DFS link names",dsflist,@TAB,@UNSORTED,@SINGLE) If DFSpath == "" Then Exit infoarray = wntDfsGetInfo( DFSPath ) title = infoarray[0]; DFS entry path. comment = infoarray[1]; comment Switch infoarray[2] ; volumestate Case 1 volumestate = "OK" Break Case 2 volumestate = "Inconsistent" Break Case 3 volumestate = "Offline" Break Case 4 volumestate = "Online" Break EndSwitch numstoretarg = infoarray[3] ;# of storage targets storetargetinfo = infoarray[4] ;a @TAB delimited list of information about each storage target. format = "" For x = 1 To numstoretarg item = ItemExtract(x,storetargetinfo,@TAB) state = ItemExtract(1,item,"|") Switch state Case 1 state = "Offline" Break Case 2 state = "Online" Break Case 4 state = "Active" Break EndSwitch serv = ItemExtract(2,item,"|") share = ItemExtract(3,item,"|") format = StrCat(format,@CRLF,"State = ",state," Servername = ",serv," Sharename = ",share,@CRLF) Next timeout = infoarray[5]; Timeout GUID = infoarray[6] ;GUID msg = StrCat("Comment:",@TAB,comment,@CRLF,"Volume state:",@TAB,volumestate,@CRLF,"# of targets:",@TAB,numstoretarg,@CRLF) msg = StrCat(msg,@CRLF,"Storage Target Info:",@TAB,format,@CRLF,"Timeout:",@TAB,timeout,@CRLF,"GUID:",@TAB,GUID) Message(title,msg) Exit