Solved

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

Posted on 2010-08-25
3
320 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Enterprise networks where VoIP phones have been deployed frequently use port configurations that allow both a computer and an IP phone to be plugged into the same switch port but use different VLANs. On Cisco equipment I'm referring to the "native V…
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now