martyngill
Programmer
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.
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.