标签:LTP info img serve 技术 图片 jpg object .net
(一)列出打印机Get-WmiObject -Class Win32_Printer -ComputerName
(New-Object -ComObject WScript.Network).EnumPrinterConnections()
(二)添加打印机
(New-Object -ComObject WScript.Network).AddWindowsPrinterConnection("\\Printserver01\Xerox5")
设置默认打印机
(Get-WmiObject -ComputerName . -Class Win32_Printer -Filter "Name=‘HP LaserJet 5Si‘").SetDefaultPrinter()
(New-Object -ComObject WScript.Network).SetDefaultPrinter(‘HP LaserJet 5Si‘)
(三)删除打印机
(New-Object -ComObject WScript.Network).RemovePrinterConnection("\\Printserver01\Xerox5")
您也可以关注下方微信公众号获取更多资讯
标签:LTP info img serve 技术 图片 jpg object .net
原文地址:https://blog.51cto.com/543925535/2391416