Remotely as in via command line. Not sure if there's a reg key or something similar I can peek at to see if a user has the correct printers mapped.
Remotely as in via command line. Not sure if there's a reg key or something similar I can peek at to see if a user has the correct printers mapped.
Well, you can take a look at the Win32_Printer WMI class,
But, I think this will get you even better results:
Without using PS Remoting, you could do this instead:
You get the idea. Basically, you need to access that user's registry key with whatever method and enumerate whatever you find in
Printers\Connections
.For anyone that's interested in what working code looks like to enumerate the accounts and get a listing of the installed printers, please see below:
This snippet first enumerates all subkeys under HKEY_Users, it then filters out the default/system account keys and the Classes keys for each user, finally it enumerates each remaining key's
\Printers\Connections
subkeys to output the printer information to the console.Kudos to Ryan, so thought I would contribute via an answer.