Windows Determine what drives users have mapped

Discussion in 'Software' started by OneSeventeen, 28 Sep 2006.

  1. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    I want to know who has which drives mapped, so I can push out some standard drive letters to everyone without overwriting what people are already using.

    (Using Active Directory on a network of Windows 2k/XP machines)
     
  2. Sp!

    Sp! Minimodder

    Joined:
    6 Dec 2002
    Posts:
    1,543
    Likes Received:
    30
    "net use" in the command prompt (without the ") will produce you a list.
     
  3. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    That's actually a really cool command, but is there a way for me (as a Domain Admin) to run this command on everyone's machine and have it send me the result for each person in our domain?
     
  4. Atomic

    Atomic Gerwaff

    Joined:
    6 May 2002
    Posts:
    9,646
    Likes Received:
    94
    Build a script to output the results of the command into a txtfile named the same as the username, then write this file to a network share (with write permissions for everyone)

    Shouldn't be too hard in VBScript, and then it could be set to run on startup via a GPO.
     
  5. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    ahh, good idea. thanks guys!
     
  6. Atomic

    Atomic Gerwaff

    Joined:
    6 May 2002
    Posts:
    9,646
    Likes Received:
    94
    Oh just thought, you may need to also stop the script running more than once per user too.
     
  7. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    Yeah, I assumed I might just have it check to see if the temp file exists, then if it doesn't, create the temp file with the output of "net use", then send a copy over to a network share.
     
  8. Sp!

    Sp! Minimodder

    Joined:
    6 Dec 2002
    Posts:
    1,543
    Likes Received:
    30
    Code:
    If NOT exist \\network\share\%username%.txt net use >>\\network\share\%username%.txt
    should do the job in a logon script
     
Tags:

Share This Page