question

RameshSwaroop-0329 avatar image
0 Votes"
RameshSwaroop-0329 asked JennyYan-MSFT commented

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

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-server-powershellwindows-server-print
screenshot.png (40.8 KiB)
screenshot1.png (68.2 KiB)
screenshot2.png (9.3 KiB)
screenshot4.png (77.3 KiB)
screenshot5.png (26.4 KiB)
screenshot6.png (46.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JennyYan-MSFT avatar image
0 Votes"
JennyYan-MSFT answered JennyYan-MSFT commented

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://docs.microsoft.com/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




1.png (20.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
I am checking to see how things are going there on this issue.

Please let me know if you would like further assistance.


Hope this helps and please help to accept as Answer if the response is useful.

Thanks,
Jenny

0 Votes 0 ·