Jump to content
Welcome to our new Citrix community!
  • 0

Powershell Copy Print Drivers to VDA (Print driver replication)


Tom Swift

Question

##Add Printer Drivers

##Run this on the machine you want to copy drivers to

##$SourceSrv is name of print server from which drivers will be copied from
$SourceSrv = "printsvr01”
$Drivers = Get-PrinterDriver * -ComputerName $SourceSrv
foreach($Driver in $Drivers){
  $InfUNC = $Null
  $Str = '\\' + $SourceSrv + '\C$\'
  $InfUNC = $Driver.InfPath.replace('C:\',$Str)
  if ($InfUNC.length -gt 1) {
      pnputil.exe /a $InfUNC
      Add-PrinterDriver -Name $Driver.Name -InfPath $Driver.InfPath
  }
}

 

#Tested in environment containing

#Citrix Virtual Applications and Desktops 1912 CU3

#Print Server running Windows 2016 or 2019

#VDA running on Windows Server 2016, Windows Server 2019 and/or Windows 10 version 21H1

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...