Information Technology Reference
In-Depth Information
-s RemoteComputer : Optional parameter that specifies the name of a remote computer to
which you want to add the port. If this parameter is omitted, the port will be added to the
local print server.
-h IPAddress : Required parameter that indicates the IP address that you want to assign to
the port.
-u UserName : Optional parameter that provides a username with permissions to create the
port on a host. If you use this parameter, you must also specify the -w Password parameter.
-w Password : Optional parameter that provides a password to be used in conjunction with
the -u UserName parameter.
-o {raw -n PortNumber | lpr} : Optional parameter that indicates whether you want to use
the TCP RAW or the TCP LPR protocol. If you select TCP RAW, you must also specify a port
number. The default port number is 9100.
-q QueueName : Optional parameter that specifies the name that you want to assign to the
TCP RAW port.
-m {e | d} : Optional parameter that specifies whether SNMP is enabled. A value of e indi-
cates that SNMP is enabled; a value of d indicates it is disabled.
-I IndexName : Optional parameter that specifies the SNMP index name.
-y CommunityName : Optional parameter that specifies the SNMP community name.
-2 {e | d} : Optional parameter that specifies whether a double spool is enabled for a TCP
LPR port. A value of e indicates that double spooling is enabled; a value of d indicates it is
disabled.
For example, the following script creates a TCP/IP printer port named IP_192.168.0.10
with an IP address of 192.168.0.10. The port is created using the Administrator account for
credentials. The port type will be TCP RAW at port 9100, and the port will have a queue named
MyQueue . Double spooling will be disabled.
> cscript prnport.vbs -a -r IP_192.168.0.10 -h 192.168.0.10 -u Administrator
-w MyPassword -o {raw -n 9100} -q MyQueue -m d
How It Works
Although printers can be connected directly to Windows Server 2003 through LPT1 and then
shared for network-wide access, most printers in business environments are attached directly
to the network, using either a typical network interface card (NIC) or a non-Windows server,
such as an HP JetDirect card. For nonlocal printers, the TCP/IP port provides the communica-
tion channel between the Windows server, the printer share, and the printer, or between the
workstations and the printer (if the printer is mapped directly rather than through a server-
based share).
The troubleshooting process for network printing frequently points to TCP/IP issues, and
therefore a sound knowledge of basic networking is required to resolve any issues. A setting
that is typically inadequately configured is that of the IP address on the printer. If a printer is
configured to use Dynamic Host Configuration Protocol (DHCP) to acquire its address, then
Search WWH ::




Custom Search