PowerShell script for network printer automation

Posted on 2014-08-25
Last Modified: 2014-08-25
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
Question by:Jerry Seinfield
    1 Comment
    LVL 16

    Accepted Solution

    I found a powershell script online that might help you.  This script is on the MS Technet script center repository:

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
    The viewer will learn how to back up in Windows 7 with native tools. This should be the first step. Third party tools should also be used. Access the Backup and Restore options: Click on the windows 7 start ball in the lower left corner of the scree…

    759 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

    11 Experts available now in Live!

    Get 1:1 Help Now