无法在ISE中添加打印机

时间:2017-06-26 20:47:28

标签: powershell

所以,我一直在尝试在Power Shell中添加打印机,代码正在运行,但最后没有新的打印机......

$Printer = ([wmiclass]"win32_Printer").createinstance()

$Printer.Name = "MyWMIPrinter2"
$Printer.DriverName = "Brother DCP-J132W Printer"
$Printer.DeviceID = "MyWMIPrinter"
$Printer.Shared = $false
$Printer.PortName = "MyPrinterPort4"

$Printer.Put_

0 个答案:

没有答案