| |
struttshumming
Posts: 8
Score: 0
Joined: 3/14/2008
Status: offline
|
Hi there, I am tring to use PRNADMIN to create a printer and port on a print server. However I cannot seem to invoke the ADD method. can any please piont out where i am going wrong? Here is the code: $MAS = New-Object -ComObject PrintMaster.PrintMaster.1 $POR = New-Object -ComObject Port.Port.1 $PTR = New-Object -ComObject Printer.Printer.1 $POR.ServerName = "MyPrintServer" $POR.PortName = "MyPortName" $POR.HostAddress = "MyAddress" $POR.PortType = 2 $POR.QueueName = "Binary_P1" $MAS.? #Need to invode add method her to create port $PTR.ServerName = "MyPrintServer" $PTR.PrinterName = "MyPortName" $PTR.DriverName = "HP4 laserjet" $PTR.PortName = "MyPortName" $MAS.? #Need to invode add method her to create printer $MAS.PrinterGet($strPrintServer, $printerName, $PTR) $PTR.Comment = "Windows LPR Port" $PTR.Location = "MyLocation" $MAS.? #well you know what i mean
|
|