Find what server a DFS link points to.

I am writing a script to find out where a user is logged in.

the script first looks at the users profile path and then passes that to code which queries LanManServer that the users profile is on for the sessions and looks for the users session on there.

But this does not work with the DFS path i need to be able to convert the DFS path to the Server and share that it is on.

Please help.

[413 byte] By [StuartCrawshaw] at [2007-12-23]
# 1

You could use the NetDFSGetInfo Win32 api function.

Check out its documentation here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stgmgmt/fs/netdfsgetinfo.asp

-Scott Wisniewski

scottwis_MS at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2

Hi,

Thanks for the reply but it appears you cannot use NetDfsGetInfo in a VBS script file?

If you can i do not know of any ways to call the api from the Netapi32.dll file

thanks for your suggestions.

StuartCrawshaw at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...