Information Technology Reference
In-Depth Information
Using VBScript
You can list all TCP/IP ports for your print server by executing prnport.vbs , located in the
%systemroot%\system32 directory. Use the following syntax:
> cscript prnport.vbs -l [-s <RemoteComputer> ][-u <UserName> -w <Password> ]
Here is a description of the parameters:
-l : Required parameter that specifies that you want to generate a list of TCP/IP printer ports.
-s Remote Computer : Optional parameter that specifies the NetBIOS name of the remote
printer whose ports you want to list. If this parameter is omitted, the local server will be
displayed.
-u UserName -w Password : Optional parameters that provide credentials needed to perform
the desired action.
For example, you can list all ports on the print server named Print2 by running the following
command:
> cscript prnport.vbs -l -s Print2
If you do not want to list all the TCP/IP ports on your print server, you can display config-
uration information for a specific port by executing prnport.vbs :
> cscript prnport.vbs -g -r < PortName > [-s < RemoteComputer >]
[-u < UserName > -w < Password >]
Here is a description of the parameters:
-g : Required parameter that specifies that you want to display the configuration informa-
tion for a particular port.
-r PortName : Required parameter that specifies the name of the port whose configuration
you want to display.
-s RemoteComputer : Optional parameter that specifies the NetBIOS name of the remote
printer containing the port whose configuration you want to display. If this parameter is
omitted, the local server will be assumed.
-u UserName -w Password : Optional parameters that provide credentials needed to perform
the desired action.
For example, you can display configuration information for TCP/IP port IP_192.168.2.10
on the server named Print3 by executing prnport.vbs as follows:
> cscript prnport.vbs -g -r IP_192.168.2.10 -s Print3
How It Works
Create a list of all TCP/IP printer ports and their configuration when you need a comprehensive
view of the network printing setup on a given device. You can easily generate reports on a per-
machine or per-network basis by putting the results into a database or spreadsheet.
Search WWH ::




Custom Search