Random helpful stuff that I have found along the way

This site will primarily serve as my place to store links and info that I refer to alot as I work with MS customers.

Inventory mapped drives in ConfigMgr 2012

Inventory mapped drives in ConfigMgr 2012

  • Comments 2
  • Likes

The ability to inventory mapped network drives was a common customer ask in ConfigMgr 2007 and SCCM Expert and some other folks provided free scripts and MOF edits to take care of this.  But can this be done in ConfigMgr 2012? 

Mapped network drives and printers are a per-user setting so you need to run a script or process under the user’s context to grab that data and store it somewhere that the hardware inventory process can get to.  The obvious place to store the data is WMI.  There may be other scripts out there that do this and if you have a better way to do this in ConfigMgr 2012 please let me know, but I chose to use a script provided by CTS for ConfigMgr 2007 and it worked just fine in my lab.  Credit to Alvin Morales and JC Hornbeck for the blog article:

http://blogs.technet.com/b/configurationmgr/archive/2008/12/18/configmgr-2007-how-to-inventory-mapped-drives.aspx

Obviously in ConfigMgr 2012 we won't perform the MOF edits shown in the article, we make the change in the ConfigMgr 2012 console itself.  But the VB script provided (mapdrives.vbs is what they called it) is required.  Given the requirements that need to be met for this to work as a ConfigMgr package (run with user rights, run only when a user is logged on, set it to re-run on a schedule, etc) this may work better as a logon script.  You could also modify the VB script to inventory mapped printers as well.  You could further modify the script to force a hardware inventory once it’s done, or just wait for the next scheduled inventory to occur.

Once you have created the package and deployed it to your clients, you can verify it worked by using WBEMTEST to connect to root\CIMV2 and look in CX_mappeddrives.

clip_image002

In the ConfigMgr 2012 console you’ll need to add the new class for hardware inventory.  So, Administration/Client Settings/Default Client Settings (or select a custom device settings group)/Hardware Inventory/Set Classes.  Click Add and use the Connect option to specify a client that now has the information stored in WMI and select the CX_mappeddrives class name.

clip_image003

Once the client has retrieved machine policy and submitted hardware inventory, you should be able to see the mapped drive data in Resource Explorer:

clip_image005

and you can confirm in the database:

clip_image007

Comments
  • I tried and it shows only one mapped drive.

    I have 6 mapped drives on my test computer.

    Can you help?

  • for me it worked fine.  make sure you have forced a hardware inventory cycle after the script runs.  on my test machine i had 4 mapped drives and all showed up.  

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment