Registering Captured Virtual Printers After Playback
*Note: This article applies to ProfileUnity 6.8.6 R1 and earlier. Printer capture and playback has been enhanced in ProfileUnity 6.8.7.
Printer playback can vary based on the application captured. For example, the print driver is played back but the printer port is absent or vice versa. Both scenarios result in the absence of the captured virtual printer.
In the event the printer port is not populated but the print driver is present, a post-activation script can be used to populate the printer
Once the port is created, the printer can be created by calling on the newly-created printer port and the played back print driver as shown in the example Powershell script below.
Add-PrinterPort -Name "PortName"
Add-Printer -Name "PrinterName" -DriverName "DriverName" -PortName "PortName"
The Powershell cmdlets listed below can be used to obtain the required information, such as drivers, ports, and printers.
Get-Printer
Get-PrinterPort
Get-PrinterDriver
In the event the print driver is not played back, a post-activation script can be used to reinstall the driver prior to recreating the port if the captured application supports this functionality. Once the print driver is reinstalled, the printer can be created using the example post-activation script mentioned above.