Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3176
  • Last Modified:

PowerShell script for network printer automation

Hello Experts,

I have a client who currently has network printers hosted on a Windows 2008 R2 printer server. All clients connecting to these printers are Windows 7 machines.

Because all these network printers reside on same VLAN where servers are hosted, we have decided to create a new VLAN and move all network printers from the original VLAN to new VLAN. I have created a new scope on the DHCP servers, and reservations to place all network printers.

Next steps are to change IP address and name for each network printer, move the printers to a new  printerserver then we would need to remap all of the printers. I am looking for a powershell script to remove the old printers from all computers in a AD site and install the new ones to all computers in same site. Other AD sites within the domain should not be affected by this change

Any ideas?

Client OS: Windows 7

Print server OS: Windows 2008 R2

Domain/functional level:  Windows 2003
0
Jerry Seinfield
Asked:
Jerry Seinfield
1 Solution
 
Spike99On-Site IT TechnicianCommented:
I found a powershell script online that might help you.  This script is on the MS Technet script center repository:
http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-for-057ae37a

This script swaps out one printer shared on the old print server for the corresponding printer shared on the new print server.  The IP port or address used for that printer on the respective print servers would not come into play since users are connecting to the printers by share name and not by IP.

Since you are using a new VLAN, I would make sure that printer ports are open between the VLAN where the printers & print server are going to be and the VLAN where the users are logged on.  The standard port used for printing is 9100, but your ports may vary depending on the type of printer.  For example, the old 3 port parallel HP JetDirect "print server" (not to be confused with a Server acting as a print server) used ports 9100, 9200 & 9300 for the 3 ports on the device.

I hope this helps.
0

Featured Post

Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now