Solved

On a File/Print server, is there a way to tell who has certain printers mapped?

Posted on 2010-08-25
3
325 Views
Last Modified: 2012-06-27
We are getting ready to do a major printer shuffle.  At that time printer names will be changed to fit the new locations of the printers.

Being slightly 'proactive' we would like to inform the individuals that have the effected printers currently mapped to their PCs so they can delete the currently mapped printer and reconnect the appropriate one after the shuffle.

We have been unable to locate anywhere, "How to tell who has which printer mapped" within out domain.
0
Comment
Question by:wrogge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Assisted Solution

by:russell124
russell124 earned 150 total points
ID: 33524657
Here is a good article on how to do so via VBS:

http://blogs.technet.com/b/heyscriptingguy/archive/2006/08/14/how-can-i-list-all-the-printers-on-a-remote-computer.aspx

You are likely going to need to run this under the context of the logged in user, I don't know your particular environment, so I am not sure as to the best way to do this.  You may be able to add this to the user's logon script and modify the above vbs to append a shared log file (with workstation/username/printer) at logon.
0
 
LVL 9

Accepted Solution

by:
asawatzki earned 350 total points
ID: 33524853
I'm not sure this is possible from the server end.  There is a way to tell who at any given moment is printing to the printers (example: http://blogs.technet.com/b/heyscriptingguy/archive/2006/01/19/how-can-i-tell-which-users-are-connected-to-a-print-queue.aspx).  But I don't know of any way from the server side to tell who is mapped to what printer.  Perhaps if you turned on some special auditing settings for print queues.

In my experience the easiest way to do this would be through a log on script run on their local machine.  If you want to get fancy you can use the script to remap them and turn it on after you do the printer move and just have it report back the results of the remapping.  

Below is a sample script that would just report to you what each user has mapped.  It will create a text file in a file share each time a user logs into a machine, just change the PrintServer and OutputLocation variables in the beginning your print server and a share that users have write access to.
PrintServer = "\\PrintServer"
OutputLocation = "\\FileServer\WriteableShare"


Set WshNetwork = CreateObject("WScript.Network")
strUsername = WshNetwork.username
strComputer = WshNetwork.computerName
OutputFile= OutputLocation & "\" & strUsername & "-" & strComputer & ".txt"

Set objFSO = CreateObject("Scripting.FileSystemObject") 
Set oLogFile = objFSO.CreateTextFile(OutputFile, True)

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Printer where Network=True",,48)
For Each objItem In colItems
  bChange = False
  If ucase(objItem.ServerName) = ucase(PrintServer) Then
    strPrinterPath = Ucase(objItem.ServerName & "\" & objItem.ShareName)
    oLogFile.WriteLine strPrinterPath
  End If
Next

oLogFile.Close
Set objWMIService = Nothing
Set oLogFile = Nothing
set objFSO = Nothing
set wshNetwork = nothing

Open in new window

0
 

Author Comment

by:wrogge
ID: 33524955
The script is 'ok', but it displays a POP UP for every printer rather than the ability to record it somewhere.
Without being able to record it somewhere, we are still in the same boat.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When I recently replaced my image transfer kit on my office HP color laserjet 5550dn printer, I had a slight problem.  The left bracket that holds the transfer kit got stuck in the upright locked position instead of being at a 45 degree angle facing…
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question