r IP_192.168.1.22 – a name of the network port If you want to connect a network printer, you must first create a TCP/IP printer port for it (suppose the printer IP address is 192.168.1.22):Ĭscript 'C:\Windows\System32\Printing_Admin_Scripts\en-US\Prnport.vbs' -a -r IP_192.168.1.22 -h 192.168.1.22 -o raw -n 9100 To set a different default printer, run the command:Ĭscript 'C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs' -t –p 'HP5525' How to Create a TCP/IP Port for a Network Printer?