Link to home
Start Free TrialLog in
Avatar of RickCurtis
RickCurtisFlag for United States of America

asked on

How can I identify what users have printers mapped from a particular print server?

I think the title says it all...
We are retiring an old print server.  Have changed login scripts to map printers to the new print server but if anybody had manually mapped a printer that is not normally covered by the script then this mapping will no longer work.  Is there a way to determine if anybody still has printers mapped to the old server?
Avatar of stathisx
stathisx
Flag of Greece image

Or you can use this code below

Option Explicit 
Dim objNetwork1, strUNCPrinter1 
strUNCPrinter1 = "\\my-print\my-printer2" 
Set objNetwork1 = CreateObject("WScript.Network" ) 
objNetwork1.RemovePrinterConnection strUNCPrinter1 
'Deletes second printer 
Wscript.Quit

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of rhinoceros
rhinoceros

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RickCurtis

ASKER

While this solution gets me to where I wanted...it does not actually answer my original question.  I wanted to create a list of user accounts *before* actually doing anything.  All responses jumped straight to the "action item" of deleting connections.  Still Con2PRT is a useful utility!  Thanks!