How to export/import printer driver settings file .DRS using powershell??

Anonymous
2021-07-21T09:29:47.727+00:00

Hello Powershell experts,

I have a query,

We usually export/import a Manual driver settings we do for drivers like CAB XC6/300 in following method, But i need the powershell commandlets in order to export/import .drs or driver settings file using powershell, here is a manual method we follow :

After installing a printer we do some manual printer settings like Printer defaults, preferences, stocks etc.

We export these changed driver settings into .drs file by going to printer defaults --> import/export settings option

For example we have source printer named as "PTEST421" where CAB XC6/300 is the driver and we have changed some of the driver settings like printer defaults, preferences, stocks etc as in below screenshot :

116686-screenshot.png

Then we want to export all printer driver settings by going to printer defaults --> import/export settings --> click on export

116712-screenshot1.png

save the .drs file in any required path

116658-screenshot2.png

Then select the New destination printer which needs this file to be imported . Here in our example "PTEST422" is our destination printer.

You can see old printer defaults of PTEST422 here.

116660-ptest422-old-screenshot.png

We need to import it using the exported .drs file, So go to printer defaults of our destination printer --> import/export settings and click on import

116732-screenshot4.png

select the .drs exported file and apply

116733-screenshot5.png

Then you can see new settings of "PTEST422" (destination printer) as same as "PTEST421" (source printer)

116742-screenshot6.png

This is the manual way. Please help with the powershell commandlets in order to export/import these driver settings of .drs file.

Thanks and regards,
Swaroop Ramesh

Windows for business | Windows Server | User experience | Print jobs
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Rich Matheisen 47,941 Reputation points
    2021-07-21T14:52:12.28+00:00

    Have you tried the Get-PrintConfiguration and Set-PrintConfiguration cmdlets?

    0 comments No comments

  2. Jenny Yan-MSFT 9,376 Reputation points
    2021-07-22T08:40:49.967+00:00

    Hi,

    In general, we will use "rundll32 printui.dll PrintUIEntry" to check and view printer settings, which contains the functions used by the printer configuration dialog boxes
    https://free.blessedness.top/en-us/windows-server/administration/windows-commands/rundll32-printui

    It seemed your printer was label printer and needed special driver and I found following thread discussing importing .dsr file:
    116990-1.png
    https://forums.nicelabel.com/viewtopic.php?t=564

    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
     
    Hope this helps and you may also post your problem there to seek advice.

    ----------

    If the Answer is helpful, please click Accept Answer and upvote it.

    Thanks,
    Jenny


  3. Andres Realpozo 0 Reputation points
    2025-09-26T23:56:34.8566667+00:00

    Use

    Export: rundll32 printui.dll,PrintUIEntry /Ss /n "<printer>" /a "<file>"
    Import: rundll32 printui.dll,PrintUIEntry /Sr /n "<printer>" /a "<file>"

    https://supportcommunity.zebra.com/s/article/Exporting-Importing-printer-settings-using-the-PrintUI-command-with-Zebra-Kiosk-Printers?language=en_US

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.