How to get a list of DFS servers within a domain

Author Message
token

  • Total Posts : 1917
  • Scores: 0
  • Reward points : 0
  • Joined: 1/14/2005
  • Location:
  • Status: offline
How to get a list of DFS servers within a domain Sunday, March 06, 2005 3:17 PM (permalink)
0
Hi all,

Does anyone know how to get a list of DFS servers starting from the DFS root within a AD domain ?

Thanks.

Hope this helps.
 
#1
    Bushmen

    • Total Posts : 122
    • Scores: 0
    • Reward points : 0
    • Joined: 2/4/2005
    • Location:
    • Status: offline
    Re: How to get a list of DFS servers within a domain Tuesday, March 08, 2005 11:28 AM (permalink)
    0
    token,

    not sure mate, although this might help you in some way..

    List Dfs Nodes on a pc

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colDfsNodes = objWMIService.ExecQuery _
    ("Select * from Win32_DFSNode")

    For each objDfsNode in colDfsNodes
    Wscript.Echo "Caption: " & objDfsNode.Caption
    Wscript.Echo "Description: " & objDfsNode.Description
    Wscript.Echo "Install Date: " & objDfsNode.InstallDate
    Wscript.Echo "Name: " & objDfsNode.Name
    Wscript.Echo "Root: " & objDfsNode.Root
    Wscript.Echo "State: " & objDfsNode.State
    Wscript.Echo "Status: " & objDfsNode.Status
    Wscript.Echo "Timeout: " & objDfsNode.Timeout
    Next

    List DFS Targets

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colDfsTargets = objWMIService.ExecQuery _
    ("Select * from Win32_DFSTarget")

    For each objDfsTarget in colDfsTargets
    Wscript.Echo "Caption: " & objDfsTarget.Caption
    Wscript.Echo "Description: " & objDfsTarget.Description
    Wscript.Echo "Install Date: " & objDfsTarget.InstallDate
    Wscript.Echo "Link Name: " & objDfsTarget.LinkName
    Wscript.Echo "Name: " & objDfsTarget.Name
    Wscript.Echo "Server Name: " & objDfsTarget.ServerName
    Wscript.Echo "Share Name: " & objDfsTarget.ShareName
    Wscript.Echo "State: " & objDfsTarget.State
    Wscript.Echo "Status: " & objDfsTarget.Status
    Next
    '===============================================================
    Bushmen
     
    #2
      token

      • Total Posts : 1917
      • Scores: 0
      • Reward points : 0
      • Joined: 1/14/2005
      • Location:
      • Status: offline
      Re: How to get a list of DFS servers within a domain Tuesday, March 08, 2005 2:33 PM (permalink)
      0
      Thanks bushmen, my believe was that I need to figure out which machine to connect to first. But on a second thought, I could be wrong. I will give it a shot tomorrow and see what comes out of it.

      Thanks again.

       
      #3
        Bushmen

        • Total Posts : 122
        • Scores: 0
        • Reward points : 0
        • Joined: 2/4/2005
        • Location:
        • Status: offline
        Re: How to get a list of DFS servers within a domain Wednesday, March 09, 2005 3:45 AM (permalink)
        0
        no problem mate,

        got it from the latest admin scripting guide released in nov 04.

        would be glad if you could use some of it, since you always help me!!!!!!!!!

        bushmen
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9