Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

How to add Print Drivers with PowerShell, RUNDLL32, and VBScript in Windows 10

Posted on 06/12/202030/08/2026 Christian By Christian 2 Comments on How to add Print Drivers with PowerShell, RUNDLL32, and VBScript in Windows 10
  1. Home
  2. Windows
  3. How to add Print Drivers with PowerShell, RUNDLL32, and VBScript in Windows 10
add Print Drivers

This article discusses ‘Add Print Drivers with PowerShell and RUNDLL32 and VBScript”. A Printer Driver is a software that your device uses to communicate with a printer on your network. The network printer does not need to have a physical connection to the network and they require an IP address or Simple Network Management Protocol (SNMP) built into CUPS to be discovered. Please see how to determine the version and type of a Printer Driver (Printer Driver Information) and how to specify a persistent default printer via the Windows Registry.

CUPS is a standard-based open-source printing system developed by Apple Inc. for macOS and other UNIX like operating systems. Here are some articles relating to Print Drivers I have written; how to delete obsolete drivers from the Driver Store in Windows 10, how to rename a Printer in Windows 10,

To add a printer driver, kindly follow any of the methods discussed below. There are other methods to have drivers installed on Windows 10 and we will be discussing them subsequencly in the future. In this article, I will be using the followng;

  • PowerShell,
  • RUNDLL32and and
  • VbScript (PRNDRVR)

This article will be grouped into Part-1 (Drivers present in the Driver Store)

Part 1 – (Drivers Preset in the Driver Store)

It is possible to add printer drivers to the Windows driver store (Prestaging). Adding a driver to the Windows driver store does not install the printer driver. It merely adds the printer driver source files to the operating systems for future use such as when connecting to a Printer or having it automatically install during a Plug and Play operation

Method 1 – VBS Scripts to Manage Printers in Windows

These scripts are present in all Windows versions (starting from Vista and Windows Server 2008) and are located in the directory C:\Windows\System32\Printing_Admin_Scripts\en-US.

PowerShell
The following VBS scripts are located in this folder:
- Prncnfg.vbs – a script to display information about the printer settings;
- Prndrvr.vbs – printer driver management (install / uninstall printer drivers);
- Prnjobs.vbs – managing print jobs;
- Prnmngr.vbs – managing printers (including creating and removing printer in the system);
- Prnport.vbs – managing connection to the remote printer via TCP/IP ports;
- Prnqctl.vbs – print queue management;
- Pubprn.vbs – managing printer publishing in Active Directory - (obsolete)

Furthermore, Here is an example how to install a printer driver from the Windows driver store using the VBScript prnddrvr.vbs.

cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "HP Type4 Class Driver" -v 3 -e "Windows x64" -i "C:\Windows\inf\ntprint.inf"
RUNDLL32

Method 2

Here is an example how to install a printer driver from the Windows driver store using the RUNDLL32.exe.

RUNDLL32 PRINTUI.DLL,PrintUIEntry /ia /f "C:\Windows\inf\ntprint.inf" /m "HP Type4 Class Driver"

Part 2

Drivers are not present in the driver store but in a file repository. This command can be used also from the MDT.

Method 1 – VBS Scripts to Manage Printers in Windows (Prndrvr.vbs)

cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "PCL6_V4_Driver" -v 3 -e "Windows x64" -i "G:\Driver\PCL6_V4_Driver\ntprint.inf"
Parameters
- a: This parameter tells the VBScript to install the driver
- m: The name of the driver you want to install
- v3: The version of the driver
- e: Specifies the The environment, i.e, the architecture of the operating system
- i “path” – the full path to the driver’s INF file.

Method 2 – Using RUNDLL32.exe

You can also manage Printers Drivers in different versions of Windows via the process rundll32.exe. This receives the name of the library printui.dll and the entry point to it (PrintUIEntry).

The command rundll32 printui.dll, PrintUIEntry is enough to perform basic operations with printers and is fully supported by Microsoft. One of the many DLLs that can be loaded is the printui.dll. For more information on how to add printers with no user interaction see this article.

UNDLL32 PRINTUI.DLL,PrintUIEntry /ia /f "G:\Driver\HP Driver\oemsetup.inf" /m "HP Printer Driver"
Parameters
1: PRINTUI.DLL: This DLL file contains all the functions required to install the printer driver.
2: /ia: This parameter lets the printui.dll know that a printer driver, using a INF file
3: /f: The complete path and file name of the INF file of the driver.
4: /m: The name of the driver you want to install

Method 3 – PowerShell:

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. Before proceeding, I will like to discuss some key Pint management cmdlets.

Print Management Module: Below is the cmdlets needed to reveal all the print-server management cmdlets.

Here is a list of print, driver, and print queue management cmdlets available in the PrintManagement module on Windows 10. More information on the Print Management Module can be found at this how to delete obsolete drivers from the Driver Store in Windows.

Get-Command –Module PrintManagement
VBScript

A: Installing a Print Driver available in the Driver Store

You may have to list the print drivers that are installed in the Windows driver store as shown below. Just to be sure it has not been added previously.

Like I said before, there are different ways to go about this. Since we are only discussing how to do this using PowerShell, we will stick to PowerShell only.

Get-PrinterDriver
Screenshot of a Windows PowerShell window displaying the output of the 'Get-PrinterDriver' command, listing various printer drivers, their versions, and manufacturers.

Note: You can only install a driver with the .inf file only if it is already in the DriverStore. You will notice that it is impossible to install using the” Add-PrinterDriver” command to install a driver that is not available in the system driver storage.

Now, let us install the Print Driver by using the cmdlet below since it is available in the DriverStore .

Add-PrinterDriver -Name "HP Universal Printing" -InfPath "C:\Desktop\HP-Driversx64\hpxxxx.inf"

B: Installing a Print Driver not available in the River Store:

If the driver is unavailable in the Drive Store. Kindly use the following steps to add and install your Printer Driver to your device using PowerShell. Add the Printer driver to the Driver Store.

You can only install the printer driver if they are imported to the driver store. This can be achieved with the built-in Windows “pnputil utility”.

Use the add the install switch to the PNPUTIL command to have it installed. To have it installed automatically. We need to add the /i switch and this command can also be executed directly from the MDT task sequence as well “pnputil.exe /a /i G:\Repository Directory\MyINFFile.INF”.

pnputil.exe -i -a C:\RepositoryDirectory\xxxxxxx.inf
This (installs the specific printer driver) or
pnputil.exe -i -a C:\RepositoryDirectory*.inf
This installs all the drivers found in the INF files in the specified directory)

Note the following below: The /reboot switch can also add this if it is needed to complete the operation. Laos, starting with Windows Vista, the Plug and Play (PnP) manager performs driver signature verification during device and driver installation. However, the PnP manager can successfully verify a digital signature only if the following statements are true

I hope you found this blog post on how to add Print Drivers with PowerShell, RUNDLL32, and VBScript in Windows 10 helpful. If you have any questions, please let me know in the comment session.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Windows Tags:Printer, Printer Management, Printing, Windows 10

Post navigation

Previous Post: How to specify a persistent default printer via the Windows Registry and PowerShell
Next Post: How to remove a Printer from Windows 10 via PowerShell, Windows registry and Print Management

Related Posts

  • ios microsoft remote desktop app
    Remote Desktop can not find the computer FQDN and this might mean that FQDN does not belong to the specified network Windows
  • MBAM
    The web application “Administration Portal” cannot be enabled because one or more software dependencies are not met Windows
  • Modernstanby
    Modern Standby: PC is automatically encrypted Windows
  • powershell commands lede 1024x276 1
    Enable WinRM on Windows Servers and Windows PCs Scripts
  • duplicate image
    How to Migrate Your WordPress Site with WordPress Duplicator Network | Monitoring
  • Uninstall SQL Server 2025
    Uninstall Microsoft SQL Server 2025 from Windows Oracle/MSSQL/MySQL

More Related Articles

ios microsoft remote desktop app Remote Desktop can not find the computer FQDN and this might mean that FQDN does not belong to the specified network Windows
MBAM The web application “Administration Portal” cannot be enabled because one or more software dependencies are not met Windows
Modernstanby Modern Standby: PC is automatically encrypted Windows
powershell commands lede 1024x276 1 Enable WinRM on Windows Servers and Windows PCs Scripts
duplicate image How to Migrate Your WordPress Site with WordPress Duplicator Network | Monitoring
Uninstall SQL Server 2025 Uninstall Microsoft SQL Server 2025 from Windows Oracle/MSSQL/MySQL

Comments (2) on “How to add Print Drivers with PowerShell, RUNDLL32, and VBScript in Windows 10”

  1. Avatar photo Sys Admin says:
    13/08/2021 at 2:39 PM

    Fantastic, thank-you !

    Log in to Reply
    1. chris Christian says:
      13/08/2021 at 2:40 PM

      You are welcome

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

Veeam Vanguard

  • BitLocker beviour when MBAM Agent is removed No uninstall options in control panel to remove app
    BitLocker behavior when MBAM agent is removed: No Uninstall Option in Control Panel Windows
  • allthings.how how to download and install winget windows package manager windows 10 winget cli
    How to install Winget CLI on Windows Windows Server
  • Install Windows Admin Center on Windows Server 2019
    Configure Windows Admin Center on Windows Server 2019 Network | Monitoring
  • Root
    Change your root password: Manage the root user on your macOS Mac
  • opsworks for automate blog
    How to setup Chef Automate on AWS Configuration Management Tool
  • HyperV
    How to install free Hyper-V Server on a VMware Workstation Virtualization
  • Object Firt OOTBI offline and online cluster update
    Offline and Online Update for Object First Out-of-the-Box Cluster Windows Server
  • Copy and Paste Between HyperV VMs and host
    Copy and Paste between your device to a VM running in Hyper-V Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,759 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.