Current location - Quotes Website - Personality signature - Common network commands.
Common network commands.
This paper synthesizes the explanation of NET command in WINDOWS 98, WINDOWS Workstation and WINDOWS SERVER, hoping to be comprehensive.

Let me say something first:

The (1)NET command is a command line command.

(2) Manage network environment, services, users and login. . . . Waiting for local information.

(3)WIN 98, WIN WORKSTATION and WIN NT all have built-in NET commands.

(4) But the NET command of WIN 98 is different from that of WORKSTATION and nt.

(5)5) The NET commands in the workstation and the server are basically the same.

(6) Ask for help

(1) Under NT, you can graphically start-help-index-enter NET.

(2) You can use the character mode under the command, NET/? Or NET or NET HELP to get some methods, corresponding to the method's help NET COMMAND /HELP or NET HELP COMMAND or NET COMMAND/? In addition, the error network HELPMSG message # is 4 digits.

(7) Mandatory parameters

All net commands accept the options /yes and /no (abbreviated as /y and /n). Simply put, it is to give an answer to the question of the system in advance.

(8) Some commands will take effect immediately and be kept permanently, so be careful when using them.

(9) For the function of network command, we can find the corresponding graphic tool solution.

Composition of (10) command

Command parameter options | parameter options | parameter options |. . . . . .

Said a lot, in fact, 6 and 7 are both useful, hehe.

There are two other things:

There are some parameters in the NET command of (1)NT that can only be used in the server environment.

There are some parameters in the NET command of WIN98 that cannot be used in DOS-WIN and can only be used in DOS environment.

The following is a preliminary introduction to the basic usage of different parameters of the NET command:

(1) network view

Function: Display the domain list, computer list or * * * resource list of the specified computer.

Command format: net view[ computer name |/domain [:domain name]]

Parameter introduction: (1) type net view without parameters to display the list of computers in the current domain.

(2) Computer Name specifies the computer whose * * * resources are to be viewed.

(3)/domain [:domainname] specifies the domain for which you want to view available computers.

Simple example: (1) view YFANG on the net to view YFANG's * * * resource list.

(2)net view /domain: I like to view the list of machines in the love domain.

(2) Network users

Function: Add or change user accounts or display user account information. This command can also be written as a network user.

Command format: net user[ user name [password | *] [options]] [/domain]

Parameter description: (1) Type net user without parameters to view the list of user accounts on the computer.

2) User Name Add, delete, change or view the user account name.

(3) Password assignment or changing the password of the user account.

(4)* Prompt for password.

(5)/domain performs operations in the main domain controller of the computer's main domain.

Simple example: (1)net user YFANG views user yfang's information.

(3) net use

Function: Connect or disconnect the computer from the resources enjoyed by * * *, or display the connection information of the computer.

Command format: net use[ device name | *] [computer name shared name [volume]] [password | *]] [/user: [domain name] user name] [/delete] | [/persistent: {yes | no}]]

Parameter introduction:

Type net use without parameters to list network connections.

Devicename specifies the name of the resource to be connected or the name of the device to be disconnected.

Computer name Shared name server and the name of * * * shared resource.

Password Password to access the * * * shared resource.

* Prompt for password.

/user specifies another user to connect to.

The domain name specifies another domain.

User Name Specifies the login user name.

/home connects users to their home directories.

/delete cancels the specified network connection.

/persistent controls the use of permanent network connections.

Simple example:

(1)net use e: YFANGTEMP creates the YFANGTEMP directory as an e drive.

(2)net use e:YFANGTEMP/delete disconnect。

(4) Net time

Purpose: To synchronize the clock of one computer with the time of another computer or domain.

Command format: net time[ computer name |/domain [:name ]] [/set]

Parameter introduction:

(1)computername The name of the server to check or synchronize.

(6) Network suspension

Function: Pause the running service.

Command format: network suspended service

(7) network continuation

Function: reactivate the suspended service.

Command format: net continue service

(8) Net stop loss

Function: Stop Windows NT network service.

Command Format: Network Stop Service

Parameter introduction: Let's see what these services are.

(1) alarm (alarm)

(2)NetWare client service (NetWare client service)

(3) clipbook server.

(4) computer browser (computer browser)

(5) directory replicator

(6) FTP publishing service (FTP) (FTP publishing service)

(7)lpdsvc

(8) Network login (network login)

(9) Network dynamic data exchange

(10) network dde dsdm (network dde dsdm)

(1 1) network monitoring agent

(12) NTLM security support provider (NTLM security support provider)

(13)ole (object linking and embedding)

(14) Remote Access Connection Manager

(15) Remote access to isnsap service

(16) Remote Access Server

(17) Remote Procedure Call (RPC) Locator (Remote Procedure Call Locator)

(18) Remote Procedure Call Service (RPC)

(19) schedule

(20) Server (server)

(2 1) simple tcp/ip service (simple TCP/IP service)

(22) Simple Network Management Protocol

(23) Spooling system (background printer)

(24) TCP/IP NetBIOS assistant (TCP/IP NetBIOS assistant tool)

(25)ups

26) workstation

(27) Messenger

(28)dhcp client

(29) Event Log

The following services can only be used on NT servers.

(1)Macintosh file server

(Gateway service of netware.

(3) Microsoft dhcp server

(4) Print server for Macintosh.

(5) Remote startup

(6)windows Internet name service

(9) Net statistics

Usage: Display the statistical records of local workstation or server services.

Command format: net statistics[ workstation | server]

Parameter introduction: (1) Type net without parameters.

Statistics lists the running services for which statistics are available.

(2) The workstation displays the statistical information of local workstation services.

(3) The server displays the statistical information of local server services.

Simple example: (1) net statistics server | more displays the statistics of server services.

(10) net share

Use: Create, delete or display * * * entertainment resources.

Command format: netshare sharename = drive: path [/users: number |/unlimited] [/remark: text]

Parameter introduction: (1) Type net without parameters.

Share displays information about all * * * resources on the local computer.

(2)sharename is the network name of * * * shared resources.

(3)drive:path specifies the absolute path of the * * * shared directory.

(4)/users:number Set the maximum number of users who can access * * * resources at the same time.

(5)/unlimited does not limit the number of users who can access * * * resources at the same time.

(6)/remark:text Add a comment about the resource, and the text of the comment is enclosed in quotation marks.

Simple example: (1) netshare My love = c:temp/ Remarks: My first time.

Share enjoys C:temp in the name of mylove.

(2)net share mylove /delete stops * * * enjoying mylove directory.

1 1) net session

Function: list or disconnect the sessions between the local computer and the clients connected to it, which can also be written as net sessions or net sessions.

Command format: net session[ computer name] [/delete]

Parameter introduction: (1) Type net without parameters.

Session displays information about all sessions with the local computer.

(2)computername identifies the computer that lists or disconnects the session.

(3)/delete ends the session with computername and closes all processes of the computer during this session.

Simple example: (1) netsessionfang wants to display a list of client session information with computer name YFANG.

(12) Send online

Purpose: Send messages to other users, computers or email names on the network.

Command format: net send {name | *|/domain [:name] |/users} message.

Parameter Description: (1)name User name, computer name or communication name to send and receive messages.

(2)* Send a message to all the names in the group.

(3)/domain [:name] sends the message to all names in the computer domain.

(4)/users sends the message to all users connected to the server.

(5) A message is a text sent as a message.

Simple example: (1) net send/users server will be shut down in 5 minutes. Send a message to all users connected to the server.

(13) network printing

Function: Display or control print jobs and print queues.

Command format: net print[ computer name] job # [/hold |/release |/delete]

Parameter Description: (1)computername*** Computer name with printer queue.

(2)sharename prints the queue name.

(3) The identification number assigned to the print job by the job # in the printer queue.

(4)/ When the job number is suspended, let the print job wait in the printer queue.

(5)/ Release Release the reserved print job.

(6)/ Delete Delete the print job from the printer queue.

Single case: (1) Screen printing YFANG Seem lists the directory of the Seem printer queue on YFANG computer.

(14) screen name

Use: Add or delete message names (sometimes called aliases), or display a list of names of messages received by the computer.

Command format: network name [name [/add |/delete]]

Parameter Description: (1) Type the screen name without parameters and list the currently used names.

(2)name specifies the name of the received message.

(3)/add Add the name to the computer.

(4)/delete to delete the name from the computer.

(15) Network Local Group

Use: Add, display or change local groups.

Command format: net local group group name {/add [/comment: text] |/delete} [/domain]

Parameter introduction: (1) Type net without parameters.

Localgroup displays the server name and the local group name of the computer.

(2)groupname The name of the local group to be added, expanded or deleted.

(3)/comment: text Add a comment for a new group or an existing group.

(4)/domain performs the operation in the main domain controller of the current domain, otherwise it only performs the operation on the local computer?

(5) Name [...] Lists one or more user names or group names to be added to or removed from the local group.

(6)/add Add the global group name or user name to the local group.

(7)/delete Delete the group name or user name from the local group.

Simple example: (1)net localgroup love /add a local group named love in the local user account database.

(2)net localgroup loves to show users in the local group.

(16) network group

Use: Add, display, or change global groups in a Windows NT Server domain.

Command format: netgroup group name {/add [/comment: text] |/delete} [/domain]

Parameter Description: (1) Type the network group without parameters to display the server name and server group name.

(2) Group Name the group to be added, expanded or deleted.

(3)/comment:text Add a comment for a new group or an existing group.

(4)/domain performs the operation in the main domain controller of the current domain, otherwise it performs the operation on the local computer.

(5) User name ...] The list shows one or more users to be added to or removed from the group.

(6)/add Add a group or add a user name to a group.

(7)/delete Delete the group or delete the user name from the group.

Simple example: (1) netgroup lovey Fang 1y Fang 2/ Add the existing user accounts yfang 1 and yfang2 to the love group of the local computer.

(17) network file

Function: Displays the number of all open * * * file names and locked files on the server.

Command format: net file [id]/close [301]]

Parameter description: (1) Type a net file without parameters to get a list of open files on the server.

(2) the identification number of the identity document.

(3)/close closes the open file and releases the locked record.

(18) network configuration

Purpose: To display the currently running configurable services, or to display and change the settings of services.

Command format: net config [service [options]]

Parameter introduction: (1) Enter net config without parameters to display the list of configurable services.

(2) Services (servers or workstations) configured by network configuration commands.

(3) Specific options for option services.

(19) network computer

Use: Add or remove computers from the domain database.

Command format: network computer computer name {/add |/del}

Parameter Description: (1)computername specifies the computers to be added or removed from the domain.

(2)/add adds the specified computer to the domain.

(3)/del Deletes the specified computer from the domain.

Simple example: (1)net computer cc /add adds computer cc to the login domain.

(20) Net account

Purpose: to update the user account database and change the passwords and login requirements of all accounts.

Command format: net accounts [/force logoff: {minutes | no}] [/minpwlen: length] [/maxpwage: {days | unlimited}] [/minpwage: days] [/uniquepw: number] [/domain]

Parameter introduction: (1) Type net without parameters.

The account displays the current password settings, login time limit and domain information.

(2)/forcelogoff:{minutes | no} Set when the user account or valid login time expires.

(3)/minpwlen:length Sets the minimum number of characters of the user account password.

(4)/maxpwage:{days | unlimited} Set the maximum number of days that the user account password is valid.

(5)/minpwage:days sets the minimum number of days that the user must keep the original password.

(6)/uniquepw:number When users are required to change their passwords, they must go through $ number times to reuse the same passwords.

(7)/domain performs this operation on the primary domain controller of the current domain.

8)/sync When used for the primary domain controller, this command synchronizes all backup domain controllers in the domain.

Simple example: (1) net accounts/minpwlen: 7 Set the minimum number of characters of the user account password to 7.

-the above is the basic usage of network command under WINNT.

-Let's take a look at the basic usage of the NET command under WIN98.

NET command also has some parameters in WIN98.

Among them, the names, functions and simple usage of some parameters are similar to those of the corresponding parameters under WINNT.

There are (1) net time commands.

(1) network print command

(1) network usage command

(1) network view command

NET command has some parameters in WIN98.

Some parameters have the same name as the corresponding parameters under WINNT, but their usage is somewhat different.

Including

(1) net start

Function: Start the corresponding service. (cannot be used in DOS-WIN)

Command format: netstart [basic | nwredir | workstation | netbind | netbeui | nwlink] [/list] [/yes] [/verbose]

(2) the network stops

Use: Stop the corresponding service. (cannot be used in DOS-WIN)

Command format: netstop [basic | nwredir | workstation | netbeui | nwlink] [/yes]

In WIN98, there are some NET command parameters that are only available in win 98.

Including

(1) net DIAG

Function: Run the MS diagnostic program and display the network diagnostic information.

Command format: net diagnostics [name |/status]

(2) network initialization

Usage: No binding loading protocol or network card driver (not used for DOS-WIN).

Command format: net initialize [dynamic]

(3) network cancellation

Use: Disconnect * * * shared resources (not available in DOS-WIN).

(4) Network login

Use: log in to the workgroup (not in DOS-WIN)

Command format: net logon [user] password |? ははは/DOMAIN:nameは/YESは/save pw:NO

(5) Network password

Use: change your network login password (not used in DOS-WIN)

Command format: net password computer |/domain: name [user (old password (new password)]]

Network Management: Another Usage of Network Command

While helping users to maintain the Network, I happened to find a Net User command among the net series commands of Windows XP operating system. After careful deliberation and practice, it is found that Net User can not only be used to add or modify users or display user information, but also set different restrictions on users, which is much better than the application effect of "user account" in the control panel. it wont hurt you to try it

The Net User command is a DOS command and must be run in MS-DOS mode under Windows XP. Therefore, you should first enter the MS-DOS mode: select the sub-option command prompt of the attachment option of the start menu, or enter "cmd.exe" (the shortcut key is Win+R) in the run option of the start menu to enter the MS-DOS mode. The following functions are based on this mode.

Create an ordinary new user

Enter the following command at the MS-DOS prompt: "net user john 123 /add" and press enter. You can create a new user with the name "John" and the password "123". The Add parameter indicates a new user.

It is worth noting that the user name is at most 20 characters, and the password is at most 127 characters.

Create a user with limited login time.

The following methods can be used to control the use time of the computer. For example, you need to set up a John user account with the password "123", and the login authority is from 8 am to 8 pm 10 pm from Monday to Friday, and from 7 pm to 9 pm on weekends.

At 1. 12 hour clock, you can type the following command: "net user John123/add/times: Monday-Friday, 8am-10pm; Sunday-Sunday, 7: 00 pm -9: 00 pm ",just press Enter.

2. You can type the 24-hour clock with the following command: "net user John123/add/times: m-f, 8: 00-22: 00; Sa-Su, 19:00-2 1:00 ",just press enter.

It is worth noting that the added value of time is limited to 1 hour. For the value of Day, you can use the full name or abbreviation (that is, m, t, w, th, f, Sa, Su). You can use 12 hour clock or 24 hour clock. For 12 hours, please use the values of AM, PM or AM, PM ... All to indicate that users can always log in; A null value (blank) means that the user can never log in. Separate the date and time with commas and the date and time unit with semicolons (for example, m, 4AM-5PM;; T, 1PM-3PM). Do not use spaces when specifying the time.

In addition, the Passwordchg:{Yes | no} parameter can be used to specify whether users can change their own passwords, and the default setting is Yes.

Restrict users' use time

The Net User command can also use the parameter expires: {{mm/DD/yyyy | DD/mm/yyyy | mmm, DD, yyyy} | never} to make the user account expire according to the specified date. The format of the expiration date can be [month/day/year], [day/month/year] or [day/month/year]. It depends on the country code. The user account expires at the beginning of the specified date. For month values, you can use numbers, full names or three-letter abbreviations (that is, January, February, March, April, May, June, July, August, September, October, November and December). For the year value, you can use two digits or four digits; Use commas and slashes to separate the parts of the date; Don't use spaces.

For example, to limit the expiration time of the user account John to 165438+20041October 5, you can type the following command: "net user john /expires:Nov/5/2004" and press enter to confirm.

View user information, modify existing user passwords and delete users.

If used without parameters, Net User will display a list of users on the computer. For example, type the following command: "net user" and press enter to display all users of the system.

If you type "network user john", please enter it to display the information of user John.

If you type the command "net user john 123456 /add" and press Enter, the password of user John(John is an existing user) will be forcibly changed to 123456.

If you type the command "net user john /delete" and press enter, you can delete the user john.

So much for the usage of network user commands. In fact, there are many skills like this, which need to be explored and communicated with each other.

(2)/domain [:name] specifies the domain to be synchronized with its time.

(3)/set synchronizes the clock of this computer with the clock of the specified computer or domain.

The following four parameters are related, so they are introduced together.

(5) Net startup

Use: Start a service or display a list of started services.