Printers and their associated ports and drivers can be imported and exported using the Windows native tool printbrm.exe. It’s not included in the PATH environment variable and therefore must be run with explicit reference to its path. While it’s typically used for print servers, it can also be used on workstations.

Important

Printbrm.exe does not work with paths that include spaces or some other special characters. It also does not support use of quotes to include spaces in paths it processes. Including these characters will return “file not found” or (in the case of a path which includes a hyphen) “unrecognized argument” errors.

Also note that a user’s personal OneDrive as managed by an organization will include a hyphen in the folder name in the form of “OneDrive – [org name]”. This path is also used when folders are redirected, such as when using KFM (Known Folder Move).

When importing & exporting printers, keep in mind the user context the import or export is being run within. A user can only import or export printers to and from their own user profile. This also means if an export run from User A is imported in the context of User B, the printers User A had will restore to User B’s user profile.

To export the printers:

%windir%\System32\spool\tools\printbrm.exe -b -f c:\printers.printerExport -o force -p all

To import the printers:

%windir%\System32\spool\tools\printbrm.exe -r -f C:\printers.printerExport -o force -p all

Events from printbrm.exe (or the GUI migration utility) can be found in the Event Viewer here:

Applications and Services Logs/Microsoft/Windows/PrintBRM/Admin

Printbrm event IDs:

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/jj519448(v=ws.11)


See also:

Leave a Reply

Your email address will not be published. Required fields are marked *