Net commands can be used to view, update, and repair network settings. The most common commands are listed below, additional commands are at Net Help.
XP and 2000 provide two command line shells, CMD and COMMAND. CMD.exe is the successor to COMMAND.com and provides additional features including long file name support.
To open a command line shell click start > Run... > Open: cmd or command
NET DIAG
Runs the Microsoft Network Diagnostics program to display network diagnostic information.
NET DIAG [/NAMES | /STATUS]
- /NAMES
- Specifies a diagnostic server name in order to avoid conflicts when NET DIAG is used simultaneously by multiple users. This option works only when the network uses a NetBIOS protocol.
- /STATUS
- Enables you to specify a computer about which you want network diagnostics information.
NET HELP
Provides information about NET commands and error messages.
command /?
NET HELP [suffix]
NET HELP errornum
- command
- Specifies the NET command that you want information about.
- suffix
- The second word of the command you want information about, e.g. the suffix of NET VIEW is VIEW.
- errornum
- error message number
NET PRINT
Displays information about print queues and controls print jobs.
NET PRINT \\computer [\printer] | port [/YES]
NET PRINT \\computer|port [job#[/PAUSE|/RESUME|/DELETE]] [/YES]
- computer
- The name of the computer whose print queue you want information about. Queue status for each shared printer is displayed if none is specified.
- printer
- The name of the printer you want information about.
- port
- The name of the parallel (LPT) port on your computer that is connected to the printer you want information about.
- job#
- The queued print job number. Options:
/PAUSE - Pauses a print job.
/RESUME - Restarts a print job that has been paused.
/DELETE - Cancels a print job. - /YES
- Command executes without prompting for information or confirmation.
NET TIME
Displays the time on or synchronizes your computer's clock with the shared clock on a Windows or NetWare time server.
NET TIME [\\computer | /WORKGROUP:wgname] [/SET] [/YES]
- computer
- The name of the computer whose time you want to check or synchronize your computer's clock with.
- /SET
- Synchronizes your computer's clock with the clock on the specified computer or workgroup.
- /YES
- Command executes without prompting for information or confirmation.
NET USE
Connects or disconnects from a shared resource or displays connection information.
NET USE [drive: | *] [\\computer\directory [password | ?]] [/SAVEPW:NO] [/YES] [/NO]
NET USE [port:] [\\computer\printer [password | ?]] [/SAVEPW:NO] [/YES] [/NO]
NET USE drive: | \\computer\directory /DELETE [/YES]
NET USE port: | \\computer\printer /DELETE [/YES]
NET USE * /DELETE [/YES]
NET USE drive: | * /HOME
NET USE
- drive
- The drive letter assigned to a shared directory.
- *
- Specifies the next available drive letter. If used with /DELETE, specifies to disconnect all connections.
- port
- The parallel (LPT) port name assigned to a shared printer.
- computer
- The name of the computer sharing the resource.
- directory
- The name of the shared directory.
- printer
- The shared printer name.
- password
- The password for the shared resource, if any.
- ?
- Specifies that you want to be prompted for the password of the shared resource. You don't need this option unless the password is optional.
- /SAVEPW:NO
- Specifies that the password should not be saved. You need to retype the password the next time you connect to this resource.
- /YES
- Command executes without prompting for information or confirmation.
- /DELETE
- Breaks the connection to a shared resource.
- /NO
- Command executes responding with NO automatically when you are prompted to confirm actions.
- /HOME
- Connects to your HOME directory in your Windows NT user account.
To list all connections, type NET USE without options.
NET VIEW
Displays a list of computers sharing resources in a workgroup or the shared resources on a specified computer.
NET VIEW [\\computer] [/YES]
NET VIEW [/WORKGROUP:wgname] [/YES]
NET VIEW
- computer
- The name of the computer whose shared resources you want to see.
- /YES
- Command executes without prompting for information or confirmation.
No comments:
Post a Comment