Our office is conducting a move with many hundreds of users from one location within a building to another and I have been tasked with coming up with a script that will remap those users printers so that upon logging in the following morning and running the logon script they will attach to the appropriate printers.
At this time I would like to break down for you how our current environment is setup:
We have three buildings on site and within each building there are designated printers in which everyone within that building will map to. There are also many freestanding network printers that users map to as is necessary. Within Active Directory we have security groups created which (assuming the user is a part of that group) in turn run a vb script that installs printers for those users.
Below is a small part of our logon script to Illustrate:
IF NOT errorlevel 1 GOTO NEXT
Below is the corresponding VB script that runs if user is a part of said Security Group
ON ERROR RESUME NEXT
Set objPrinters = WScript.CreateObject("WScript.Network")
Set objShell = WScript.CreateObject("WScript.Shell")
'Remove old printers
'Install new Printers
'Clean Up Memory Used
set objShell = Nothing
Set objPrinters = Nothing
With that said I was hoping to gain some assistance with creating a new script that determines if a user is connected to a certain printer (rather than Security Group) and if so deletes that printer and remaps a new printer in it's place. The many users who are moving are not part of any one constant Security Group and therefore makes it difficult for me to modify the current scripts we have in place to automatically map the printers for the users.
What I am hoping to do is have a script in place that will check the users accounts for certain connected printers that I know will be a part of the move and upon determining the user is connected to that printer, delete the printer and re-connect to the printers new location. I plan on implementing the new Logon script the day following the move.
If anyone has any idea's on how to accomplish this task it would be much appreciated. I'm also open to new idea's as well.