Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DFS Namespace to Active File Path

Status
Not open for further replies.

martyngill

Programmer
Dec 2, 2011
1
GB
Does anyone know how to enumerate a DFS Namespace to the Active File Path?

I have tried:

sdfsnode="DFS PATH" 'which I obviously change to a DFS path

set svc=getobject("winmgmts:root\cimv2")
set ctarget=svc.associatorsof("win32_dfsnode.name='" & sdfsnode & "'", _
"win32_dfsnodetarget","win32_dfstarget","dependent","antecedent")
for each otarget in ctarget
if otarget.status=4 then
wscript.echo _
"active target node of dfsnode '" & sdfsnode & "'" & vbcrlf & _
"name : " & otarget.name & vbcrlf & _
"link name : " & otarget.linkname & vbcrlf & _
"share name : " & otarget.sharename & vbcrlf & _
"server name : " & otarget.servername
exit for
end if
next
set ctarget=nothing
set svc=nothing

with no success.

Any ideas? Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top