Sherry helped me long ago put together a user based printer solution.  It’s a 
two parter… first the script I run via sccm advert with the user’s rights.  You 
could also do this via group policy logon script or whatever…  
user_printers.vbs (just rename file)

The attached file configurationmof.txt is stuff to add to configuration.mof

The attached file userprinters.mof.txt is a shot at what you would need to 
import into your hardware inventory client area to pull that data




Jimmy Martin | ENGINEER-SYSTEMS II | BMHCC - CORPORATE |
(901) 227-8209 | [email protected] <mailto:[email protected]>
The opinions expressed above are not necessarily those of 
Baptist.<mailto:[email protected]>

From: [email protected] [mailto:[email protected]] On 
Behalf Of Sherry Kissinger
Sent: Monday, October 21, 2013 5:44 PM
To: [email protected]
Subject: RE: [mssms] Can a users Network Printer be captured for SSRS Reporting

This is not the solution, but is part of an idea to get you partly there to a 
solution.

http://www.mnscug.org/blogs/sherry-kissinger/249-pstfinder

That routine is to make a local wmi class which your users can write to. That 
way, a script run in user context can populate wmi which you can grab with a 
hinv edit, no configuration.mof change needed.

If you need help getting it all to work, let me know. I don't have anything 
tested, but it shouldn't be too horrid to make it work.
Dwayne <[email protected]<mailto:[email protected]>> wrote:
What a tease.. Microsoft puts the table there, but no easy way to populate 
it..(with Network Printer, i.e. ServerName, ServerShare)   I’m thinking a vbs 
script to capture network Printer,  Pkg the script, deploy it, and use it in 
conjunction with a modified configuration.mof and or a custom inventory .MOF to 
populate this table..    ??   I think the caveat will be the Network Printer is 
tied to a user profile and not the machine per se’


Dwayne Hebert




[cid:[email protected]]


From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Garth Jones
Sent: Monday, October 21, 2013 4:19 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: [mssms] Can a users Network Printer be captured for SSRS Reporting


The Win32_Printers class will only pull local printers (Ports such as LPT, PRN, 
COM, IP, etc.)  or mapped printers for the computer. You will need to use a 
scrip to pull user printers. There has been rumors of another class that will 
give you this details but I have yet to find it or confirm the rumor.


Notice that in the screenshot that I have mapped a printer as me on SCCMR2 
server, now notice within the Wbemtest launched as the system account the 
printer is not listed.  But also notice the Bother HL-4150CDN, that is a 
network printer using IP port. So the question become what are you looking for? 
IP Printers or Network printers?




[cid:[email protected]]




From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Dwayne
Sent: Monday, October 21, 2013 4:21 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: [mssms] Can a users Network Printer be captured for SSRS Reporting


Cool.. thanks Christopher it certainly is the easiest and probably the obvious 
way..  Glad to hear it pulled the network printers..  Again I was under the 
impression it was for local printers only, and in our environment (SCCM 2012) 
we had not had that enabled.


Dwayne Hebert


From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: Monday, October 21, 2013 3:07 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: [mssms] Can a users Network Printer be captured for SSRS Reporting


I was able to get that printer report to show network mapped printers without 
issue.
Enable the hardware classes for printers and wait for the devices to start 
reporting in.


I did this at a former employer so I unfortunately do not have access to the 
environment anymore.


Christopher Catlett
Consultant | Detroit
[cid:[email protected]]


Sogeti USA
Office 248-876-9738 |Fax 877.406.9647
26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456
www.us.sogeti.com<http://www.us.sogeti.com/>


From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Mark Mears
Sent: Monday, October 21, 2013 4:01 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: [mssms] Can a users Network Printer be captured for SSRS Reporting


In order for a user to use a printer, any printer, they have to have a driver 
installed…  I would think you could query for a driver that has a device 
associated with it.


Thanks,
________________________________



Mark Mears
[email protected]<mailto:[email protected]%0d>
Phone: (757) 945-2651



[cid:[email protected]]<http://www.cireson.com/>



[cid:[email protected]]<http://twitter.com/teamcireson>  Check out 
our System Center App Store: www.cireson.com/app-store




________________________________





From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Dwayne
Sent: Monday, October 21, 2013 2:49 PM
To: [email protected]<mailto:[email protected]>
Subject: [mssms] Can a users Network Printer be captured for SSRS Reporting


Greetings,
    Has anyone been able to capture a user’s network Printer info, and been 
able to somehow create a DB table with that info to use in SSRS Reporting..  I 
know under default client hardware Inventory “Set Classes” there is a “Printer 
Configuration”, but I believe It’s only used for Local Printers..  Since a 
Network printer would follow someone’s user Profile, is there a way to collect 
that and somehow create a new Hardware Inventory Class to use in Reporting?


Thanks for any input


Dwayne Hebert..
















--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.




This message and any files transmitted with it may contain legally privileged, 
confidential, or proprietary information. If you are not the intended recipient 
of this message, you are not permitted to use, copy, or forward it, in whole or 
in part without the express consent of the sender. Please notify the sender of 
the error by reply email, disregard the foregoing messages, and delete it 
immediately.

P Please consider the environment before printing this email...


Attachment: user_printers.txtvbs
Description: user_printers.txtvbs

//----------------------
// User Printers
//----------------------

#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("Win32Reg_UserPrinters",NOFAIL)
[ dynamic, 
  provider("RegProv"),
  ClassContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\BMHCC\\Printers")
]
class Win32Reg_UserPrinters
{
    [key]      
        string    PrinterID;
    [PropertyContext("Server")]        
        string    Server;
    [PropertyContext("Printer")]        
        string    Printer;
    [PropertyContext("ScriptRan")]        
        string    ScriptRan;
    [PropertyContext("UserName")]        
        string    UserName;
};
#pragma namespace ("\\\\.\\root\\cimv2")
instance of __Namespace
{
    Name = "SMS" ;
};
#pragma namespace ("\\\\.\\root\\cimv2\\SMS")

[ SMS_Report (TRUE),
  SMS_Group_Name ("User_Printers"),
  SMS_Class_ID ("MICROSOFT|WIN32REG_USERPRINTERS|1.0"),
  Namespace ("root\\\\cimv2") ]
class Win32Reg_UserPrinters : SMS_Class_Template
{
    [ SMS_Report (TRUE), key ]
    String     PrinterID;
    [ SMS_Report (TRUE) ]
    String     Printer;
    [ SMS_Report (TRUE) ]
    String     ScriptRan;
    [ SMS_Report (TRUE) ]
    String     Server;
    [ SMS_Report (TRUE) ]
    String     UserName;
};

Reply via email to