shawn.pederson Posted August 7, 2013 Report post Posted August 7, 2013 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). Ran the attached VBS script (SCCM_PRINTER_INV.vbs) to copy the network printers to said hive. Modified the ‘configuration.mof’ file to look in the hive for the information. Modified the client agent settings to pull information (classes) from that hive. 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: 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 Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 7, 2013 Report post Posted August 7, 2013 I should also mention I have compiled the .MOF on the client as well: C:\Windows\system32>mofcomp C:\temp\configuration.mofMicrosoft ® MOF Compiler Version 6.1.7600.16385Copyright © Microsoft Corp. 1997-2006. All rights reserved.Parsing MOF file: C:\temp\configuration.mofMOF file has been successfully parsedStoring 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 will 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! Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 7, 2013 Report post Posted August 7, 2013 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 Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 7, 2013 Report post Posted August 7, 2013 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. 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. Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 7, 2013 Report post Posted August 7, 2013 use this blog post to troubleshot the issue. http://be.enhansoft.com/post/2013/07/25/Troubleshooting-Inventory-Flow.aspx Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 7, 2013 Report post Posted August 7, 2013 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... Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 7, 2013 Report post Posted August 7, 2013 So has your Resource Explorer not updated with a new data and time? Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 7, 2013 Report post Posted August 7, 2013 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. Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 8, 2013 Report post Posted August 8, 2013 Just to be clean. The workstation status data and time has not updated? I'm not interested in the printer stuff yet. Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 8, 2013 Report post Posted August 8, 2013 Sorry... yes the status time did update. My last post was confusing. Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 8, 2013 Report post Posted August 8, 2013 Then it means there is no data in the Reg keys. Confirm that there is data within the reg keys. Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 8, 2013 Report post Posted August 8, 2013 Verified. The registry keys do contain data. Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 8, 2013 Report post Posted August 8, 2013 Can you show me the key path... Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 8, 2013 Report post Posted August 8, 2013 Sure. HKEY_LOCAL_MACHINE\SOFTWARE\SCCMINV\PRINTERINV\ Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 8, 2013 Report post Posted August 8, 2013 The issue is going to be with your sms_def.mof, you will be able to see this by following the either video. Make sure that you connect to root\cimv2 then find your printer class. Remote PC http://www.youtube.com/watch?v=2nPxjzhZbVM Local PC http://www.youtube.com/watch?v=d9UqSSQ3kBE If you see data within WMI (wbemtest) then force a full inventory using sccm client center. Quote Share this post Link to post Share on other sites More sharing options...
shawn.pederson Posted August 12, 2013 Report post Posted August 12, 2013 Thanks Garth, I believe this issue is isolated to my workstation (must be WMI issues). As I have ran this on a few others; and it is collecting the data. Interestingly, I am unable to query the SMS_ConsoleUser with WBEMTEST as it crashes when I try to bring up the instances.... regardless this is working now. I will see if I can figure out why that crashes and post any findings. Faulting application name: wbemtest.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc77f Faulting module name: OLEAUT32.dll, version: 6.1.7601.17514, time stamp: 0x4ce7c930 Exception code: 0xc0000005 Fault offset: 0x0000000000001029 Faulting process id: 0x145c Faulting application start time: 0x01ce976b410c00bc Faulting application path: C:\Windows\System32\Wbem\wbemtest.exe Faulting module path: C:\Windows\system32\OLEAUT32.dll Report Id: 73c9f9c7-0366-11e3-9d0c-005056c00008 Quote Share this post Link to post Share on other sites More sharing options...
Elscorpio Posted August 11, 2014 Report post Posted August 11, 2014 Where did the sms_def.mof file go in SCCM 2012 SP1? Great post, im trying to get this working as well in my SCCM environment Quote Share this post Link to post Share on other sites More sharing options...
Peter van der Woude Posted August 11, 2014 Report post Posted August 11, 2014 It doesn't exist anymore, you can now work with the hardware inventory classes in the client settings. 1 Quote Share this post Link to post Share on other sites More sharing options...
Elscorpio Posted September 5, 2014 Report post Posted September 5, 2014 It doesn't exist anymore, you can now work with the hardware inventory classes in the client settings. Is this guide an easier way to get per user mapped network printers imported into SCCM 2012 ? http://myitforum.com/myitforumwp/2014/03/29/configmgr-inventory-per-user-network-printer-mapped-information-datashift-replacement/ Quote Share this post Link to post Share on other sites More sharing options...
Dom Posted September 10, 2018 Report post Posted September 10, 2018 (edited) Hello, Apparently the link on myitforum.com is gone... http://myitforum.com/myitforumwp/2014/03/29/configmgr-inventory-per-user-network-printer-mapped-information-datashift-replacement/ Any other way to get the user network printer? Thanks, Dom Edited September 10, 2018 by Dom Add proper link Quote Share this post Link to post Share on other sites More sharing options...