Printer Driver Installs


i have been searching , searching, , banging head desk while on this:

my team manages under 100 print servers (along few thousand...yup) windows servers globaly , in need of scripting printer driver installs on server 08.  printui.dll has proven horribly broaken peice , printbrm.exe creates files large manage effciently.

what want use posh.  know easy current list of printer drivers (gwmi win32_printerdriver).  i've seen several instance of vbs files use addprinterdriver method cannot work.  keep getting returnvalue 87 ("the parameter incorrect").  below code 1 printer.

$objwmi = [wmiclass]"win32_printerdriver"
$objdriver=$objwmi.createinstance()
$objdriver.name = "hp laserjet p3005 pcl 6,3,windows nt x86"
$objdriver.driverpath = "c:\windows\system32\spool\drivers\w32x86\3\unidrv.dll"
$objdriver.configfile = "c:\windows\system32\spool\drivers\w32x86\3\hpmdp5r1.dll"
$objdriver.datafile = "c:\windows\system32\spool\drivers\w32x86\3\hpc30056.gpd"
$objdriver.dependentfiles = "c:\windows\system32\spool\drivers\w32x86\3\hpcp3005.cfg","c:\windows\system32\spool\drivers\w32x86\3\hpc30x56.xml","c:\windows\system32\spool\drivers\w32x86\3\hpcsc5r1.dtd","c:\windows\system32\spool\drivers\w32x86\3\hpc30xx6.gpd","c:\windows\system32\spool\drivers\w32x86\3\hpc30xxc.ini","c:\windows\system32\spool\drivers\w32x86\3\hpcp6.hpx","c:\windows\system32\spool\drivers\w32x86\3\hpcui5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcpe5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpc6r5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcdmc32.dll","c:\windows\system32\spool\drivers\w32x86\3\hpbcfgre.dll","c:\windows\system32\spool\drivers\w32x86\3\hpzbdi.dll","c:\windows\system32\spool\drivers\w32x86\3\hpzbdi32.msi","c:\windows\system32\spool\drivers\w32x86\3\hpc6m5r1.gpd","c:\windows\system32\spool\drivers\w32x86\3\hpcsm5r1.gpd","c:\windows\system32\spool\drivers\w32x86\3\hpcst5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcur5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcsat.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcev5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\pclxl.dll","c:\windows\system32\spool\drivers\w32x86\3\pjl.gpd","c:\windows\system32\spool\drivers\w32x86\3\pclxl.gpd","c:\windows\system32\spool\drivers\w32x86\3\hpchl5r1.cab","c:\windows\system32\spool\drivers\w32x86\3\unires.dll","c:\windows\system32\spool\drivers\w32x86\3\unidrvui.dll","c:\windows\system32\spool\drivers\w32x86\3\stdnames.gpd","c:\windows\system32\spool\drivers\w32x86\3\stddtype.gdl","c:\windows\system32\spool\drivers\w32x86\3\stdschem.gdl","c:\windows\system32\spool\drivers\w32x86\3\stdschmx.gdl","c:\windows\system32\spool\drivers\w32x86\3\hpcls5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcss5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcpn5r1.dll","c:\windows\system32\spool\drivers\w32x86\3\hpcc35r1.dll"
$objdriver.helpfile = "c:\windows\system32\spool\drivers\w32x86\3\unidrv.hlp"
$objdriver.datafile = "c:\windows\system32\spool\drivers\w32x86\3\hpc30056.gpd"
$objdriver.oemurl = "http://go.microsoft.com/fwlink/?linkid=37&prd=10798&sbp=printers"
$objdriver.supportedplatform = "windows nt x86"
$objdriver.version = 3
$rtncode = $objwmi.addprinterdriver($objdriver)
$rtncode.returnvalue

i gathered settings first installing drivers, exporting settings wmi.  files in correct location also.

recently have migrated printers servers new 2k8 boxes. have scripted of standard .vbs scripts provided os. more information on following link: http://articles.techrepublic.com.com/5100-10878_11-5030819.html  , following entry in technet library: http://technet.microsoft.com/en-us/library/cc725833(ws.10).aspx. notice other printer scripts in left side of index field further reference.

i have installed drivers first, have created printer ports prnport.vbs , created printers prnmngr.vbs. shared printers prncnfg.vbs , made needed registry tweaks powershell.

the 1 thing never found out how make sure, start or afterwards, default page size a4 instead of letter. should know how please let me know.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client