Solved

How can I run a report of all mapped drives for every user on my network?

Posted on 2011-03-14
41
1,843 Views
Last Modified: 2012-05-11
Hello,

I'm interested in finding out how to run a report of all our users mapped drive they have on there computer. Is there a way to do this with some free software and it will give me a good detailed report of all my users (LAN/WAN) mapped drives with drive letters?

Thanks,

nimdatx
0
Comment
Question by:nimdatx
  • 19
  • 8
  • 7
  • +2
41 Comments
 
LVL 8

Expert Comment

by:jawa29
ID: 35130234
Hi nimdatx

You could include in the last part of a login script this command line

net use > C:\mappeddrives.txt

You could also redirect this to a server share

net use > \\servername\share\computername-mappeddrives.txt

Jawa29
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35130278
I'm new to logon scripts and the net use cmd. Can you explain the steps for me to successfully use your recommended logon script?

Thanks so much.

nimdatx
0
 
LVL 8

Expert Comment

by:jawa29
ID: 35130362
Lets assume your running a Domain?

On each user in Active Directory Users & Computers they have a profile tab, in this tab is a section to add a login script. This login script can be something like a .bat(Batch Command) file or maybe a .vbs(VBScript).

So lets say we create a file called logon.bat and save this in the NETLOGON share of your server, this could then be referenced on the Profile tab under logon script.

You could simply add the command I supplied in a .bat file that would run as the user logged in.

Jawa29

0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 43

Expert Comment

by:Jackie Man
ID: 35130371
Have a look of a google book in the link below and you will have an idea of how "net use" command works.

http://books.google.com.hk/books?id=bYOiQWBTSS0C&pg=PA271&lpg=PA271&dq=net+use+list+mapped+drives&source=bl&ots=7hcX_mXmC_&sig=LLb0TXcmWlQq5RKIacz7JwF9m0U&hl=zh-TW

net use is a basic command from windows 2000 to windows 7.
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35130526
ok, where would the output be saved? Another words, where would I go view the results of everyones mapped drive information?

I have over 250 users that are mapped to a drive
\\Fileserver\Renal Common
\\Fileserver\ACCT
etc....

and I wanted to know who was mapped so i can go to each machine to remap to our new Fileserver

\\Filesrv\Renal Common
\\Filesrv\ACCT
etc....

now that I have a more understanding on how to utilize a logon script, ny thought is maybe I can do a logon.bat to remap everyones drive. What would be the NET USE command to do this?

0
 
LVL 8

Expert Comment

by:jawa29
ID: 35130554
Depending on the drive letter it is very simple.

net use G: /del
net use G: \\filesrv\renal common

etc....

Jawa29
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35130611
Awesome. I'm testing and I hope it works. Thats it? I just copy the following cmd into a notepad and save as a .bat?

net use G: /del
net use G: \\Filesrv\Renal Common

I then save in the NETLOGON and edit GP to utilize this logon script?

 
0
 
LVL 8

Expert Comment

by:jawa29
ID: 35130625
Yes

If you want to distribute a login script using GPO then I would recommend VBScript, with the batch file above you need to add that to the users Profile tab in AD Users & Computers.

Glad I could help
Jawa29

0
 
LVL 1

Author Comment

by:nimdatx
ID: 35131928
Ok, I created a .bat file with the following script on my desktop to test out before I save in NETLOGON

net use G: /del
net use G: \\192.168.1.173\renal common

When I run on desktop it deletesmya existing map drive G:, however it doesn't create my new map drive G: \\192.168.1.173\Renal Common. Any idea why?

Thanks,

nimdatx



0
 
LVL 8

Accepted Solution

by:
jawa29 earned 250 total points
ID: 35132069
You need to put quotes around the network path.
This only needs to be done if there is a space in the network path.

E.G. "\\192.168.1.173\Renal Common"

Jawa29
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35132147
That WORKED!!!! Real Close. Now when i save the document into my NETLOGON folder (I went to run - \\192.168.1.173\NETLOGON and moved .bat file into that folder) the scrip/.bat file seem to not run when I rebooted. Am I missing something?

THANKS SO MUCH.
0
 
LVL 8

Expert Comment

by:jawa29
ID: 35132174
You still need to add filename.bat to the users Profile tab in Active Directory Users & Computers (where filename is the name you called the bat file)

You need to login to your Domain Controller to do this stage.

Jawa29
0
 
LVL 26

Expert Comment

by:pony10us
ID: 35132193
Did you: "with the batch file above you need to add that to the users Profile tab in AD Users & Computers." as stated by jawa29 ins ID:35130625
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35132199
Ok
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35138945
When adding .bat file in the users profile tab in ADUC, am I adding the name of the file (logon.bat) within logon script underneath profile path. What is the proper way to add this logon script in profile tab? It's not working when I just put in the name of the file. Note, I copied the .bat file in the NETLOGON.

Thanks,

nimdatx
0
 
LVL 26

Expert Comment

by:pony10us
ID: 35139001
The script needs to be placed in:   c:\windows\sysvol\sysvol\<domain name>\scripts

The NETLOGON is read only pointer to that location.
0
 
LVL 26

Expert Comment

by:pony10us
ID: 35139023
Also, only put the name of the script in.  

YES:  login.bat
NO: c:\login.bat
NO: c:\windows\sysvol\sysvol\<domain name>\scripts\login.bat
NO c:\netlogon\login.bat
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35139430
pony10us, thanks. Do I have to do it for every account profile or is there an easier way to change for my entire domain? I mean I know I can use GP, but I'm not sure how to use this script.
0
 
LVL 8

Expert Comment

by:jawa29
ID: 35139474
You can multi select your users then edit that tab for all

Jawa29
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35139542
Mapping drives using logon scripts is too laborious


GP Preferences Will Reduce Logon Scripts : Mapping Drives

http://blogs.technet.com/b/grouppolicy/archive/2009/02/11/gp-preferences-will-reduce-logon-scripts-mapping-drives.aspx
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35139565
I put the name of the script as you requested but doesn't work.

 logon script
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35139646
Have you tried using GP preferences instead ?

http:#a35139542
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35139900
Yes, however the GPP didn't work for me.

 Drive Maps
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35139948
For action you have "Update"

If there is no previous mapped drive as "J" then update will fail.

change it to Create
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35139997
You also have "Run in user's context" set to NO...You should also change this as well
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35140021
ok this is after changes

<?xml version="1.0" encoding="utf-8" ?>
- <Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" name="J:" status="J:" image="0" changed="2011-03-15 16:49:33" uid="{AE75A38C-0963-431F-88EC-4AA6DC8727E1}" userContext="1" bypassErrors="1">
  <Properties action="C" thisDrive="NOCHANGE" allDrives="NOCHANGE" userName="" path="\\192.168.1.173\Renal Common" label="Renal Common" persistent="0" useLetter="1" letter="J" />
  </Drive>
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35140051
Do I need to put %logonusers%?

for example; \\192.168.1.173\Renal Common\%logonusers%
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35140080
Try


\\192.168.1.173\Renal Common\%username%
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35140793
It doesn't work.
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35140832
what does rsop.msc show ?
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35141003
I see the logon.bat.

 rsop
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35141101
Tuesday, March 15, 2011 1:11:00 PM

Group Policy Drive Maps processed successfully but failed to log resultant set of policy information.

Additional Information:
The user 'J:' preference item in the 'My Documents Redirect {35E961C8-D9D2-4409-A548-FE0F33D33A5C}' Group Policy object did not apply because it failed with error code '0x80070037 The specified network resource or device is no longer available.'%%100790273

The client-side extension could not log RSoP data because it failed with error code '0x8004401e <unknown-message-text>'.


Tuesday, March 15, 2011 1:10:38 PM

Folder Redirection failed due to the error listed below.
Cannot complete this function.

Additional Information:
Failed to apply policy and redirect folder "Videos" to "%HOMESHARE%\Users\JaimeC.RAPA.000\My Videos".
 Redirection options=80009001.
 The following error occurred: "".
 Error details: "The specified path is invalid.
".
0
 
LVL 26

Expert Comment

by:pony10us
ID: 35141156
Sorry I got called away on an emergency.

When you saved the logon.bat you did place it on the server in the scripts folder and not on the local workstation correct?

0
 
LVL 1

Author Comment

by:nimdatx
ID: 35141175
Correct.   c:\windows\sysvol\sysvol\<domain name>\scripts

0
 
LVL 1

Author Comment

by:nimdatx
ID: 35141195
The reason I don't use GPP is that at this time it doesn't seem to work and deploying client within WSUS is whole other task I'm not familiar with. The logon script seems to be the best if I can get to work.
0
 
LVL 47

Assisted Solution

by:Donald Stewart
Donald Stewart earned 250 total points
ID: 35141278
I would resolve all your folder redirection issues before continuing with trying to map drives
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35141295
0
 
LVL 26

Expert Comment

by:pony10us
ID: 35141315
Ok, let's try something. Change your logon.bat to the following:

net use G: /del
net use G: "\\192.168.1.173\renal common"
pause

This should stop the logon.bat at the end revealing any error messages encountered. I am thinking that there may be a permissions issue either with the logon.bat or the "\\192.168.1.173\renal common"

0
 
LVL 1

Author Comment

by:nimdatx
ID: 35141636
I disabled all my other GPOs (my document redirect, GPP) and rebooted my system and it worked. Not sure what happened.

It's working now, but if i disable GPO with logon script will it disconnect map drive once it's been mapped?

THANKS SO MUCH for hagging with me through this issue.
0
 
LVL 1

Author Comment

by:nimdatx
ID: 35141677
0
 
LVL 26

Expert Comment

by:pony10us
ID: 35141707
So it comes back to an order/inheritence issue of GPO's. There must be a more restrictive setting for drives in one of the other GPO's, I would enable each one at a time and see which one "breaks" it. Once the GPO applies it should remain unless/until someone overrides it with another.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question