What is the best way to scan to find what drive mappings are set for all logged in users on all desktops in the domain? This will be used to determine what drive letters are in use in the environment.
This is in a corporate environment within an Active Directory 2003 domain. I currently use an SMS 2003 advertisement that runs "net use" and pipes to a log file. It takes a very long time to hit every desktop. Is there a better way?
The fastest way may be using WMI. If you're adept with Perl, you can even use the Win32 modules. Somewhere around here, I have a script that will give most of that information.
All these answers were very good clues to get me going. Thank you.
I happened across this VBScript example that does exactly what I was looking for and works nicely.
Here's the code snippet from that post:
There may be a better way, but the way you're doing it right now is actually very good, and though it feels slow, speed shouldn't be an issue.
Your users aren't changing their mappings daily, and even if they are you probably only care about those mappings that are relatively permanent.
Running the net use advertisement, though it takes awhile, only needs to be done a few times a month to keep on top of drive mappings.
-Adam
I actually wrote a program at one point in time that would run as part of the login script and collect that information then publish it to a database with a web site. Would this be something you'd be interested in running? I could dust off the old code and hand it over if you like.