所以,我一直在尝试在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_