Home NT Commands
NT Syntax

NET.exe

The NET Command is used to manage Network Print jobs and Network Time as follows:

The NET TIME command requires the `server' service to be running on the machine that is serving the time.

Display the time at this computer plus the DATE in US Format
NET TIME \\%ComputerName%

Display the date and time from another computer
NET TIME \\machinename

Display the date and time from the logonserver
NET TIME %LOGONSERVER%

Display the time from the domain timeserver
NET TIME /DOMAIN

Display the time from another domain
NET TIME /DOMAIN:domainname

Define the time server for your domain
NET TIME /setsntp:ServerName.DomainName.com

List the time server(s) for your domain
NET TIME /querysntp

Synchronise the computer's clock with that of the domain.
NET TIME /DOMAIN /SET /Y

Synchronise the computer's clock with a different domain.
NET TIME /DOMAIN:domainname /SET

Synchronise the computer's clock with that of another computer
NET TIME \\servername /SET /YES
Under Windows 2000 - you can also use the "w32tm" command

Synchronise the computer's clock with a time server in a different domain.
NET TIME /RTSDOMAIN:domainname /SET

Display the job# of current print jobs
NET PRINT \\ComputerName\ShareName

Hold a print job waiting in the printer queue
NET PRINT [\\ComputerName] job# /HOLD

Release a print job that has been held.
NET PRINT [\\ComputerName] job# /RELEASE

Delete a print job from a printer queue.
NET PRINT [\\ComputerName] job# /DELETE

List all available printers
NET VIEW \\MyServer |find "Print"

Related commands:

CON2PRT
- Connect or disconnect a Printer
PRNCNFG - Display, configure or rename a printer
PRNJOBS - Pause, resume, cancel, or list print jobs
PRNMNGR - Add, delete, or list print connections, set the default printer

WSH Commands:
Add printer - WshNetwork.AddPrinterConnection
List printers - WshNetwork.EnumPrinterConnections
Set default printer - WshNetwork.SetDefaultPrinter

Equivalent Linux BASH commands:

lpc - Line printer control program
lprm - Remove jobs from the print queue



Simon Sheppard
SS64.com