Powershell script to install printer remotely. Unlock seamless automation today.
Powershell script to install printer remotely May 16, 2024 · Learn how to add a printer driver by IP on a local or remote Windows computer using a simple PowerShell script. Hi all, I'm looking to remotely change the printer driver on roughly 200 machines. The Get-Printer cmdlet retrieves a list of printers installed on a computer. Oct 22, 2021 · But if I add the printer manually via clicking in the "printers and scanners" settings, I get the full selection of preferences. May 7, 2025 · The powershell script in this gist is a modified version of a script I wrote to deploy the HP UPD in a Windows Provisioning Package. exe] Script Windows drivers can be installed remotely and silently using an executable [. If you’re not familiar with PrintUI. Mar 4, 2016 · If you have ever needed to manage printers on a computer remotely (Install, Delete, Modify, Clear a Print Queue) then this article should be helpful. Jordan breaks it down. Jun 8, 2025 · Did you check if the PDQ execution account has the necessary rights to share the printer? I’ve had success using those PowerShell commands, but it can fail if permissions aren't set right. Powershell Script that retrieves about all installed printers for the current logged on user First of all I am not really into scripting. I can do this remotely. In this post we will show you how to grab the source content for your printer drivers and build a win32 app to install the driver and network printer. DLL, it is the file that Dec 6, 2020 · In this session, we will be discussing the various PowerShell commands needed to install, manage, and remove printers, print ports, drivers, and queues using PowerShell. Normally I do a manual add from the users profile (ie remote control session or physically at the users desk). Sep 19, 2018 · I have written before about how to install a printer and printerport from the command line. But for local installation or remote sites that don’t have a print server, is PowerShell a great option Mar 17, 2022 · Running Add-Printer remotely probably wouldn't add the printer to the user logged in (assuming that there is a logged in user). Also, if the printers you're trying to install have sharing issues, you might want to troubleshoot that first. This post will cover two methods: using a print server and setting up an IP port. Here’s a step-by-step tutorial: Use the Add-Printer cmdlet to add a network printer. This guide explains how to create, delete, or share a printer from the PowerShell console; set a default printer; map a network printer; install or remove printer drivers; and manage local ports and print queues. They have different names and there are two different drivers they may need to change to. You cannot use wildcard characters with Add-PrinterPort. - tommyvange/Printe Jun 20, 2023 · Purpose This brief article details the commands necessary to use PowerShell to add/install/map a network printer for all users of a computer. After setting the port without any problem… This is a script made entirely to allow the remote install of Printer's, Drivers, and ports on multiple servers. Jan 27, 2022 · I am currently working in Powershell. This post covers how to manage printers with PowerShell. printerExport) in a list of computers (plain computer list, OU or CSV file) using PSExec. Oct 11, 2024 · With PowerShell, you can automate common printer and printer driver management tasks in Windows. The add-printer command only works for me when ran as a non-admin user context for whatever reason. Background The script in focus is designed to add or remove a shared printer from a network. You can add both local printers and connections to network-based printers. Unlock seamless automation today. But Is there a way to run this against a specific . Oct 25, 2017 · I have done it before in a batch file, but I would like to create Powershell scripts to allow a user (non-admin) on our network to install a specific IP printer. Using PowerShell to add network printer capabilities brings several advantages: Automation Advantages: PowerShell allows for scripts that can automate the repetitive task of printer installation, vastly reducing manual effort. I have created a Script that allows me to install the specified printer to any given machine on our network. I know I can use Add-Printer -connectionname \printserver\printername and it will do what I want, but only for MY profile. g. The script dynamically queries available printers via net view, extracts share names and comments, and presents them in a list. You may need administrative credentials to run Add-Printer. You can use wildcard characters with Get-Printer. In this post, I will also explain how you can list printers, add a printer port, set the default printer, and remove a printer with PowerShell. Licensed under GPLv3. It is specifically designed to work without requiring administrative privileges. PARAMETERS -remotepc HOST name or IP address of the remote PC where to install the printer -port <String> Printer IP Address -printerName <String> Printer name to show in the installed printer list <CommonParameters> This cmdlet supports the common parameters: Verbose, Debug, ErrorAction Basically, windows handles printer drivers in the weird way (maybe there's a reason for that I don't know about, but it's still weird). com/blog/using-po The Add-PrinterPort cmdlet creates a printer port on the specified computer. This is for adding printers from a print server: The general jist is to powershell script turn off the RestrictDriverInstallationToAdministrators reg key, add the printers using add-printer, then turn the reg key back on. You cannot use wildcard characters with Add-PrinterDriver. However, I'm struggling (and frustrated) with trying to install new drivers. ), REST APIs, and object models. Install Script Description The install script adds a printer port and a printer using the specified parameters. inf I tried below line of code in powershell but get an error saying that. You can use Add-PrinterPort in a Windows PowerShell remoting session. Installing and managing printers is best done using print management on a server combined with a GPO for the deployment. Nov 7, 2022 · With PowerShell, you can easily install a printer driver, add a printer to the repository, and then add a local or shared network printer to your Windows installation. Time-Saving Efficiencies: With a few lines of command, you can set up multiple printers in a matter of minutes. You can use Add-Printer in a Windows PowerShell remoting session. Also, we get information on whether printers are shared and published to AD or not (True or I am unable to run an invoke-command script to install printers on a remote machine. The following PowerShell commands are supported with PowerShell version 4 and newer. This guide unveils clever techniques for seamless software deployment. Follow this step-by-step guide to retrieve installed printers, their status, and configurations efficiently! Aug 31, 2021 · Install printer drivers export file (*. For the Powershell command I use Add-Printer -ConnectionName [\\servername\\printername](file Install printer drivers export file (*. Complete install script included Est. May 21, 2020 · Adding printers using PowerShell is pretty simple. These are USB printers. reading time: 6 minutes Aug 2, 2022 · Learn how to deploy printers on Windows machines using PowerShell and RMM tools with SYSTEM permissions. Oct 17, 2021 · To do this, I plan on creating a script that will be deployed via GPO that installs print drivers and network printers. I have a script that installs printers by IP address for drivers that are already installed. The PrinterManagement module includes commands for creating, modifying, and removing printers, getting a list of printers, printer configuration, and many more to manage printer drivers and their properties. You can use Add-PrinterDriver in a Windows PowerShell remoting session. exe from the computer or server you want to export them. Below is the test script I'm working with. While managing printers is the bane of any sysadmin's existence, let's focus that r̶a̶g̶e̶ energy on learning how to manage printers using PowerShell, which might make them slightly less terrible. Perfect for IT pros looking to streamline printer deployments! Add-Printer -ConnectionName \\printserver\printername All commands must be run in an elevated (Administrator) PowerShell session or, if invoked remotely, with Administrator credentials. Mar 29, 2016 · If you check out this script: How to install printers with PowerShell | PDQ It wil show you how to deploy the printer at the machine level and not the user level. So I am sorry if I may ask a "stupid" question or likewise things. Description The Add-Printer cmdlet adds a printer to a specified computer. Feb 6, 2009 · First published on TECHNET on Feb 06, 2009 Today we’re going to go over a quick method to deploy print queues and printer drivers to multiple machines when other deployment methods, including deploying via GPO are not feasible. You can also use Get-Printer to retrieve the properties of a single printer, and then use that information as input into other cmdlets. Dec 9, 2022 · This articles shows how to manage printers in Windows using WMI objects and COM interfaces. I was trying to get a script running to install new printers without having to go to each pc via rmm. Are you tired of manually adding printers to your Windows devices? Using custom scripts, Hexnode UEM allows you to add printers to Windows devices remotely. Great for batch scripts, but these days we use PowerShell for this of course. You cannot use wildcard characters with Add-Printer. To generate a printer export file with all print drivers, run PrintbrmUI. PowerShell includes a command-line shell, object-oriented scripting language, and a set of tools for executing scripts/cmdlets and managing modules. I can't see any difference between my Powershell-created printer and my mouse-click-created printer other than the port type (TCP/IP vs IPP - would that possibly affect being able to set preferences?). You need administrator credentials to run Add-PrinterDriver. I am assuming that your are on a domain, have administrative permissions and have remote management enabled for your computers. Master the art of deploying applications effortlessly with a PowerShell script to install exe silently and remotely. Can I use Powershell to get the printer (s) on the remote machine that use a specific driver and then update it to the new driver if that driver is installed locally? Might be kind of complex so any Discover the art of using PowerShell to install software remotely. It checks if the port and printer already exist and takes appropriate actions to ensure they are correctly configured. Doing this manually works always, just type in the prints server name in the Explorer, right click, choose connect and, I guess you have to fill in your credentials for the driver. Simplify your printing setup and enhance productivity. Solution 2: Perform each Step with pnpUtil. Sep 17, 2025 · Learn how to list printers in PowerShell! This guide covers commands to list installed, network, shared, and remote printers, including Active Directory. I would like to find to get all installed printer for the current logged on users of any pc on the network. You can copy this code to your own script, either open it by running through powershell, or open it in the IDE and run it from there. exe and PowerShell For an environment which does not have Active Directory and a server source for drivers. pdq. Jun 20, 2023 · Purpose This brief article details the commands necessary to use PowerShell to remove a network printer for all users of a computer. For example during a client deployment or when a user logs on. JSON, CSV, XML, etc. You do not need administrator credentials to run Get-Printer. This method ensures printers are available to all users without manual setup, saving time and simplifying management. It uses LPD to connect so the user doesn't not need to be on the network for the script to work (lot of hybrid workers). You can use a Get-Printer in a Windows PowerShell remoting session. Viewing Printers To begin managing printers with PowerShell, let’s start by viewing the existing printers installed on the system. PowerShell scripts for installing, uninstalling, and verifying printer drivers on Windows, optimized for both manual and automated deployments like Intune. exe] script. Includes 5 different methods and solutions for enterprises. Nov 21, 2024 · Learn how to list printers using PowerShell. But, the part you're missing is - for whatever reason, in order to use printer drivers, windows also wants you to add drivers from windows repository (which is here C:\Windows Hi, I'm writing a script to allow techs (like me) to remotely configure and install printers on computer. Hi All, I frequently need to install network printers for users when GP fails to map. exe] Custom Scripts Library Install Printer Driver Silently Executable [. You can create a local printer port, a printer port using TCP, and LPR printer ports by using Add-PrinterPort. Be carefully because this tool exports all printers and ports too. You must have user credentials with Administrator access on Aug 20, 2025 · Y ou can install printers via PowerShell — and it's actually quite simple to do so, especially if you have a print server. You'll need the printer's IP Dec 30, 2020 · LazyAdmin – 19 Sep 18 How to add a Printer with PowerShell — LazyAdmin Complete guide on how to add a printer with PowerShell, including printer driver and printer port. We’re going to use PsExec from Windows SysInternals in combination with some PrintUI. For instance, right now I'm trying to install this driver: https://support. I have a INF file stored in C:\temp\hpPrinter\autorun. Aug 27, 2025 · PowerShell, with its robust scripting capabilities, plays a pivotal role in automating routine tasks in the IT domain. My code works locally, but as soon as I pipe it into Invoke-command, i get errors. Apr 14, 2024 · In this guide, we’ll explore how to effectively manage Windows printers using PowerShell, covering various aspects such as viewing printers, installing drivers, and managing print queues. Wondering how to install printers with PowerShell? https://www. Apr 25, 2025 · Learn how to set the default printer in Windows using PowerShell with this step-by-step guide. Desired additions or changes in order of time thought of: Adding Property changes. In the past when I had to add printers to users computers I would either use a logon script or group policy. Apr 15, 2024 · I want to deploy all our printers via our RMM tool. Mar 27, 2025 · There are a few ways to remotely install printer drivers. Sep 4, 2023 · In the above PowerShell script, the Get-Printer command uses the ComputerName parameter to specify the remote computer name “ INCORP-EU-20 ” and retrieves a list of installed printers from a remote computer. Step 1: Open Print Management as Admin Click start and search for Print Management. I recommend install all drivers in a test computer without printers Oct 10, 2017 · Managing printers with PowerShell instead of VBScript? Sometimes it’s necessary to add and remove specific printers to a computer. So what you're doing is you're adding printer driver to windows driver repository. Nov 25, 2024 · Discover how to effortlessly powershell install printer driver with our step-by-step guide. The modifications are to try idiotproofing the script and make it more compatible with public consumption. Local: Dec 17, 2023 · Using PowerShell to add a network printer to a computer can be quite efficient. Oct 12, 2023 · Add-Printer -DriverName "$driver_name" -Name "$printer_name" -PortName "$port_name" My objective is to remotely install a Konica printer via Intune using PowerShell. However, I need help with adding Parameters(Variab The Add-PrinterDriver cmdlet installs a printer driver on the specified computer. hp. Jan 3, 2020 · Listing Printers on a Print Server Using PowerShell How to display the full list of printers installed on this computer? Go by the instructions: Get-Printer As you can see in the picture below, the command displays such printers’ characteristics as Name, Type (local or network), Driver, Print Port. PowerShell is a cross-platform (Windows, Linux, and macOS) automation tool and configuration framework optimized for dealing with structured data (e. Sep 17, 2024 · I have been trying to add a papercut printer to local clients using PDQ/Powershell, but it more or less fails. Apr 5, 2015 · With powershell versions before windows 8 and server 2012, you would have to create a logon script to add the new printers and mark the default printer using WMI commands. Right Click on Print Manager and Feb 13, 2023 · I would like a PowerShell script that can install a printer driver. To install software with PowerShell remotely, you need to set up your environment for remote operations to connect the remote machine. Custom Scripts - PowerShell, VB, Batch, Executable [. Hi all, wanted to share a script that I wrote to install network printers at my org. You do not need administrator credentials to run Add-PrinterPort. The script appears to work for users that are local admins when running as system account. Apr 15, 2023 · PowerShell is a versatile scripting language that offers a powerful and flexible way to remotely install software using PowerShell scripts. Installing a local network printer Installing a local Jun 3, 2025 · This PowerShell script provides a graphical interface (GUI) that allows users to view, select, and install shared network printers from a remote print server. DLL commands. Sep 4, 2023 · The PrinterManagement module is a PowerShell module that provides cmdlets for managing the printers on Windows computers. Jan 3, 2022 · Learn how to easily install network printers with Intune using win32 apps and PowerShell. hduqxnoketwrkcyzxhtwtynmznrdkbvrjtccrhllppmphznyomjnbfvrrnpifrnjywuozfvfdg