powershell添加网络打印机问题
powershell吧
全部回复
仅看楼主
level 1
cch1101 楼主
各位好,我这边准备使用powershell添加网络打印机,客户端都是
win10
-2004。现在发现运行脚本后,可以正常在设备中添加打印机,但是不能打印文件,也没有什么报错提示,驱动用过系统自带的和官网下载的。但是都不能打印。
脚本内容:
$ComputerName = $env:COMPUTERNAME
#$DriverName = 'Brother MFC-L8900CDW'
$IPAddress = '192.168.2.17'
$PortName = '192.168.2.17'
$PrinterName = 'Brother MFC-L8900CDW'
pnputil.exe -i -a '\\192.168.0.1\Soft\CHN\BHPCL5E.INF'
Add-PrinterDriver -Name 'Brother PCLXL Generic Driver'
Add-PrinterPort -Name $PortName -ComputerName $ComputerName
Add-Printer -ComputerName $ComputerName -Name $PrinterName -DriverName 'Brother PCLXL Generic Driver' -PortName $PortName
2021年01月26日 08点01分 1
level 1
你好,请问您的问题解决了么
2021年11月01日 07点11分 4
level 1
没试过。
帮你找个博客参考
https://www.pdq.com/blog/using-powershell-to-install-printers/
文章里面是
Add-PrinterPort -Name "Ports McGee" -PrinterHostAddress "IP Of Printer"
Add-PrinterPort 用了 PrinterHostAddress 设置打印机 ip,不知道有没有关系
2021年11月05日 03点11分 6
感觉你命令里面,没有设置过ip地址,全是 name
2021年11月05日 03点11分
level 1
组策略可以实现的事 干嘛要用这个
2021年12月18日 06点12分 7
1