Cmd-net command Explanation

Source: Internet
Author: User
Tags close close net command net time net send

NET command encyclopedia, net command usage, NET network command, net command use, net command set, net command introduction, NET common commands, net command usage tips, net command how to use

Everyone in the process of operating Windows 9x/nt/2000/xp/2003 system, will be more or less encounter such or such problems, especially when the network administrator in the maintenance of the unit's LAN or WAN, if you can master some of the Windows system of Web command use skills, Often will bring great convenience to work, sometimes can play a less effective effect; This article on the Net Network command in the actual operation of the use of skills for your reference.


This
Text
Main
To
Within
Capacity

NET View NET User NET use NET time Net Start
Net Pause Net Continue NET Stop Net Statistics Net Share
Net Session Net Send Net Print Net Name Net localgroup
Net Group Net File Net Config Net Computer Net Accounts

We know that the net command is a command-line command, and the net command has many functions for utility and verification of the NetBIOS connection between computers, can view our management network environment, service, user, login and other information content; To get Net help can (1) Under Windows can be graphically, starting with help, index and input NET, (2) Under command can be used in the character mode: NET/? or NET or net help to obtain the appropriate method of assistance. All net commands accept options/yes and/no (abbreviated to/y and/n).

The following techniques for using the different parameters of the net command are described below:

1, Net Viewi
Role: Displays a list of domains, a list of computers, or a shared resource for a specified computer.
Command format: Net view [\\computername |/domain[:d Omainname]]
For parameter description:
• Type a net view with no parameters to display a list of computers for the current domain
\\computername Specify the computers for which you want to view shared resources
/domain[:d Omainname] Specifies the domain for which you want to view available computers
For example: Net view \\GHQ View a list of shared resources for the GHQ computer.
Net view/domain:xyz View the list of machines in the XYZ domain.
   
2. Net User
Role: Add or change user accounts or display user account information.
Command format: Net user [username [password | *] [options]] [/domain]
For parameter description:
• Type NET user without parameters to view a list of users ' accounts on the computer
username Add, delete, change, or view user account names
password assigning or changing passwords for user accounts
• Prompt to enter a password
The/domain performs operations on the primary domain controller of the computer's primary domain. This parameter is available only on Windows NT Workstation computers that are members of the Windows NT Server domain. By default, the Windows NT Server Computer performs operations on the primary domain controller. Note This action occurs on the primary domain controller of the computer's primary domain. It may not be a logon domain.
For example, the Net user ghq123 View the user GHQ123 information.Add Account: NET user pmx 11111/add    Delete account: NET user pmx/delete    elevate to administrator: net localgroup Administrators PMX    Set account time limit: NET user pmx 123/add/times:monday-friday,8am-4pm;saturday-sunday,9am-10pm
3. Net Use
Role: Connect the computer or disconnect the computer from the shared resource, or display the connection information for the computer.
Command format: Net use [devicename | *] [\\computername\sharename[\volume]] [password|*]][/user:[domainname\]username][[/ delete]| [/persistent:{yes | no}]]
For parameter description:
• Type net use without parameters to list network connections
devicename Specifies the name of the resource to connect to or the name of the device to be disconnected
Name of the \\computername\sharename server and shared resource
Password access the password for the shared resource
* Prompt to type a password
/user Specify another user to connect to
DomainName Specify another domain
username Specify the user name for login
/home connecting users to their host directories
/delete canceling a specified network connection
/persistent controls the use of persistent network connections.
For example: Net use F: \\GHQ\TEMP to set \\GHQ\TEMP directory as F-drive
Net use F: \ghq\temp/delete disconnected.

4. Net Time
Function: Synchronize the computer's clock with the time of another computer or domain.
Command format: Net time [\\computername |/domain[:name]] [/set]
For parameter description:
\\computername The name of the server to check or synchronize
/domain[:name] Specifies the domain to synchronize with its time
/set synchronizes the computer clock with the clock of the specified computer or domain.

5. Net Start
Role: Starts the service or displays a list of services that have been started.
Command format: Net start service

6. Net Pause
Role: Pauses a running service.
Command format: Net pause Service

7, Net Continue
Role: Re-activates the suspended service.
Command format: Net continue Service

8. Net Stop
Role: Stop the Windows nt/2000/2003 Network Service.
Command format: Net stop service
Let's take a look at the services included in the four commands above:

(1) Alerter (alarm);
(2) Client Service for NetWare (Clients Services for NetWare)
(3) ClipBook server (ClipBook server)
(4) Computer Browser (Computer browser)
(5) Directory Replicator (Directory replicator)
(6) FTP Publishing Service (FTP) (FTP distribution services)
(7) Lpdsvc
(8) Net Logon (network logon)
(9) Network DDE (NET DDE)
(10) Network dde dsdm (NET DDE dsdm)
(11) Network Monitor Agent (Web monitoring agents)
OLE (Object linking and Embedding)
() Remote Access Connection Manager (remotely access Connection manager)
Remote access ISNSAP service (ISNSAP services)
() Remote access server
(+) Remote Procedure call (RPC) Locator (remoting procedure calls locator)
() Remote procedure call (RPC) service
(+) Schedule (Dispatch)
() server (server)
Simplified TCP/IP services (Simple TCP/IP service)
(+) SNMP
Spooler (print spooler)
(+) TCP/IP NetBIOS Helper (TCP/IP NetBIOS Helper)
(a) Ups
(+) Workstation (workstation)
(+) Messenger (Messenger)
() DHCP Client

9, Net Statistics
Role: Displays statistical records of local workstations or server services.
Command format: Net statistics [workstation | server]
For parameter description:
• Type NET statistics without parameters to list the running services for which statistics are available
Workstation displaying statistics for the local workstation service
Server displaying statistics for the local server service
Example: Net statistics Server | More displays statistics about the Server service.

10, Net Share
Role: Create, delete, or display shared resources.
Command format: Net share Sharename=drive:path [/users:number |/unlimited] [/remark: "Text"]
For parameter description:
· Type net share without parameters to display information about all shared resources on the local computer
· ShareName is the network name of the shared resource
· Drive:path the absolute path of the specified shared directory
· /users:number set the maximum number of users who can access shared resources concurrently
· /unlimited does not limit the number of users who concurrently access shared resources
· /remark: "Text" adds a comment about the resource, the comment text is quoted in quotation marks
For example: Net share yesky=c:\temp/remark: "My first Share"
Share C:\temp with Yesky as share name
Net share Yesky/delete stop sharing Yesky directory

11. Net Session
Role: Lists or disconnects the session of the local computer and the client to which it is connected.
Command format: Net session [\\computername] [/delete]
For parameter description:
• Type NET session without parameters to display information about all sessions with the local computer.
\\ComputerName Identifies the computer on which the session is to be listed or disconnected.
/delete ends the session with the \ComputerName computer and closes all open files for the computer during this session. If the \ComputerName parameter is omitted, all sessions with the local computer are canceled.
For example: Net session [Url=file://\\ghq]\\ghq[/url] to display a list of client session information with computer name GHQ.

12. Net Send
Function: Sends a message to another user, computer, or communication name on the network.
Command format: Net Send {name | * |/domain[:name] |/users} message
For parameter description:
Datastore to receive the user name, computer name, or communication name of the sending message
* Send a message to all names in a group
/domain[:name] Send a message to all names in the computer's domain
/users sending messages to all users connected to the server
message text sent as a message
For example: Net send/users server would shutdown in minutes. Send a message to all users connected to the server.

13. Net Print
Function: Displays or controls print jobs and print queues.
Command format: Net print [\\computername] job# [/hold |/release |/delete]
For parameter description:
ComputerName The computer name of the shared printer queue
ShareName print queue name
job# The identification number assigned to the print job in the printer queue
/hold The print job waits in the printer queue when you use job#
/release releasing a reserved print job
/delete Delete a print job from the printer queue
For example, Net print \\GHQ\HP8000 lists the directory of HP8000 printer queues on the [Url=file://\\ghq]\\ghq[/url] computer.

14. Net Name
Action: Adds or removes a message name (sometimes called an alias), or displays a list of names that the computer receives a message from.
Command format: Net name [name [/add |/delete]]
For parameter description:
• Type net name without parameters to list the name currently used
datastore specifies the name of the receive message
/add Adding a name to the computer
/delete Remove a name from the computer

15, Net localgroup
Role: Add, display, or change local groups.
Command format: Net localgroup groupname {/add [/comment: "Text"] | /delete} [/domain]
For parameter description:

• Type net localgroup without parameters to display the server name and the local group name of the computer
groupname the name of the local group to add, expand, or delete
/comment: "text" adds a comment to a new or existing group
/domain operations are performed on the primary domain controller of the current domain, otherwise only on the local computer
Datastore [...] List one or more user or group names to add to or remove from a local group
/add Add a global group name or user name to a local group
/delete Remove a group or user name from a local group
For example, the Net localgroup Ggg/add adds a local group named GGG to the local user account database;
Net localgroup GGG Displays the users in the GGG local group.

16. Net Group
Role: Add, display, or change global groups in the Windows nt/2000/2003 Server domain.
Command format: Net group groupname {/add [/comment: "Text"] | /delete} [/domain]
For parameter description:
• Type the net group with no parameters to display the server name and the server's group name
groupname groups to add, extend, or delete
/comment: "text" adds a comment to the new or existing group
/domain The operation is performed on the primary domain controller of the current domain, otherwise the operation is performed on the local computer
username[...] List shows one or more users to be added to or removed from a group
/add Add a group or add a user name to a group
/delete Delete a group or remove a user name from a group
For example: Net group GGG GHQ1 ghq2/add Add Existing user accounts GHQ1 and GHQ2 to the GGG group on the local computer.

17. Net File
Function: Displays all open shared file names and the number of locked files on a server.
Command format: Net file [ID [/close]]
For parameter description:
• Type net file without parameters to get a list of open files on the server
ID File identification number
/close Close open files and release locked records

18. Net Config
Action: Displays the currently running configurable service, or displays and changes the settings for a service.
Command format: Net config [service [options]]
For parameter description:
• Type net config with no parameters to display a list of configurable services
Service services configured through the Net CONFIG command (server or workstation)
Specific options for options Services

19, Net Computer
Role: Add or remove computers from the domain database.
Command format: Net computer \\computername {/add |/del}
For parameter description:
\\computername Specifies the computers to be added to or removed from the domain
/add Adding a specified computer to a domain
/del To remove the specified computer from the domain
For example, Net computer \\js/add adds the computer JS to the logon domain.

20, Net Accounts
Role: Update user account Database, change password and login requirements for all accounts.
Command format: Net accounts [/forcelogoff:{minutes | no}] [/minpwlen:length] [/maxpwage:{days | unlimited}] [/minpwage:days] [/ Uniquepw:number] [/domain]
For parameter description:
• Type NET accounts without parameters to display current password settings, logon time limits, and domain information
/forcelogoff:{minutes | no} set when a user account or a valid logon time expires
/minpwlen:length Set the minimum number of characters for a user account password
/maxpwage:{days | unlimited} sets the maximum number of days that a user account password is valid
/minpwage:days Set the minimum number of days the user must keep the original password
/uniquepw:number requires the user to change the password, it must pass number of times before the same password can be reused
/domain Perform this operation on the primary domain controller of the current domain
/sync when used with the primary domain controller, this command synchronizes all the backup domain controllers in the domain
For example, Net Accounts/minpwlen:8 sets the minimum number of characters for a user account password to 8.
Of course, net command specific in the WIN98/NT/2000/XP/2003 environment, there may be some differences, please refer to the relevant information, there is not much to say.
The following is a practical example of sharing net, ping, and Ipconfig commands, testing the connectivity of a local area network, and determining whether files and printers for a remote computer's Microsoft Network Service are shared. For the comrades in the Learning Operation Net Network command for reference, the specific steps are as follows:
1) First we use the Ping command to test the connectivity of TCP/IP and then use the display of the ipconfig command to ensure that the NIC is not in the "media disconnected" state.
2) Open the DOS command prompt, and then use the IP address to Ping the required hosts for testing.
If the Ping command fails with a request timed out message, verify that the host IP address is correct, that the host is running, and that all the gateways (routers) between the computer and the host are running.
3) To use the ping command to test the host name resolution feature, use the host name to ping the desired host.
If the Ping command fails with the "Unable to resolve target system name" message, verify that the host name is correct and that the host name can be resolved by the DNS server.
4) to test the TCP/IP connection using the net VIEW command, open a command prompt, and then type the net view\\ computer name. The Net view command lists file and print shares on a computer that uses Windows xp/nt/2000/2003 by establishing a temporary connection. If there is no file or print share on the specified computer, the Net view command displays the There is no entries in the list message.
If the Net view command fails with the "System error occurred" message, verify that the computer name is correct, that the computer that is using Windows xp/nt/2000/2003 is running, and that the computer and use Windows xp/ Whether all the gateways (routers) between the nt/2000/2003 computers are running.
If the net view command fails, the "System error 5 has occurred" appears. Access is denied. " Message, verify that the account that you are logged on with has permissions to view shares on the remote computer.
To further troubleshoot connectivity issues, do the following:
A) Ping the computer name by using the ping command.
If the Ping command fails with the "Unable to resolve target system name" message, the computer name cannot be resolved to an IP address.
b) Use the net view command and the IP address of the computer running Windows xp/nt/2000/2003 as follows:
NET view \\IP address, if the net view command succeeds, the computer name resolves to the wrong IP address.
If the net view command fails with the "System error occurred" message, the remote computer may not be running file and printer Sharing for Microsoft network services. Remote Desktop Connection: Start-run--MSTSC

Cmd-net command Explanation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.