Skip to content

SCCM 2012 Mapped Network Printers - Hardware Inventory

Featured Replies

Having trouble pulling the mapped network printers for a user; here’s what I have done so far:

 

On a test computer ran the attached (zipped) SCCM_REGINI.txt (with regini.exe) to build a registry structure to pull the users network printers (from the CURRENT_USER hive) to a hive called SCCMINV (in LOCAL_MACHINE).

post-14550-0-34819500-1375888893_thumb.jpg

 

Ran the attached VBS script (SCCM_PRINTER_INV.vbs) to copy the network printers to said hive.

post-14550-0-75790900-1375888894_thumb.jpg

 

Modified the ‘configuration.mof’ file to look in the hive for the information.

post-14550-0-08668100-1375888897_thumb.jpg

 

Modified the client agent settings to pull information (classes) from that hive.

post-14550-0-70345400-1375888898_thumb.jpg

 

I still can’t seem to find the SQL table in my SCCM DB. Anyone have any ideas on where to start?

 

I have verified the classes being copied on the test client logs:

post-14550-0-04283100-1375888900_thumb.jpg

 

All the scripts are taken from: http://myitforum.com/myitforumwp/2011/11/23/howto-printer-inventory-script-w-network-printers/

  • See attached ZIP file.

And verified with: http://schadda.blogspot.se/2012/02/sccm-2012-customize-extend-hardware.html

SCCM_Printer_Inventory1.zip

  • Author

I should also mention I have compiled the .MOF on the client as well:

 

C:\Windows\system32>mofcomp C:\temp\configuration.mof
Microsoft ® MOF Compiler Version 6.1.7600.16385
Copyright © Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: C:\temp\configuration.mof
MOF file has been successfully parsed
Storing data in the repository...
WARNING: File C:\temp\configuration.mof does not contain #PRAGMA AUTORECOVER.
If the WMI repository is rebuilt in the future, the contents of this MOF file wi
ll not be included in the new WMI repository.
To include this MOF file when the WMI Repository is automatically reconstructed,
place the #PRAGMA AUTORECOVER statement on the first line of the MOF file.
Done!

There is no need to compile the configuration.mof on the clients, it will happened automatically.

 

The SQL views will be called something like v_GS_PrinterInv and v_GS_PrinterInv64

  • Author

Thanks Garth! I had a look in there. Don't seem to see it. I see dbo.v_GS_Parallel_Port to PWR_Policy but no PRINTERINV.

 

post-14550-0-32717600-1375911400_thumb.jpg

 

post-14550-0-63472200-1375911351_thumb.jpg

 

I was also under the assumption that I would be able to see the pulled information per device under the Resource Explorer from the CCM console. However, no luck. I am terrible with SQL but my next step was to build a report then then push the above mentioned VBS/INI scripts to more computers; once I verified it is working.

  • Author

Thanks Garth, all looks well. Flows from the client to the site server then gets dumped into the DB.

 

InventoryAgent.log:

<![LOG[Collection: Namespace = root\cimv2; Query = SELECT __CLASS, __PATH, 
__RELPATH, KeyName, Comment, Default, DriverName, Local, Location, Name, 
Network, PortName, ServerName, ShareName, UserID FROM PRINTERINV; Timeout = 600 
secs.]LOG]!><time="15:56:28.981+360" date="08-07-2013" 
component="InventoryAgent" context="" type="1" thread="6628" 
file="collectiontask.cpp:478">

DATALDR.LOG on Site Server:

Done: Machine=SPEDERSON(GUID:05875980-F038-4B2C-ADC3-B92CB0F6EA1B) code=0 
(105 stored procs in XH3PYAYJI.MIF)

I'm stuck...

  • Author

Yes it did update. It says last updated 30 minutes ago under the Workstation Status node. However, the PRINTERINV information is no where to be found.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.