Net command details

Source: Internet
Author: User
Tags net command net time typing net net send
Net command details

Many Windows NT Network commands start with net. These net commands have some common attributes:

By typing net /? You can view all available net commands.

You can enter the net HELP command to obtain the syntax help of the net command in the command line. For example, to get the help of the Net accounts command, type net help accounts.
 
All net commands accept options/Yes and/NO (abbreviated as/y and/N ). /Y automatically answers "yes" for any interaction prompts generated by the command, and/n answers "no ". For example, net stop server usually prompts you to determine whether to end all services based on the server service. net stop server/y automatically answers "yes" and closes the server service.

Net accounts

Updates the user account database, changes the password, and logon requirements for all accounts. It must be on the computer on which the account parameter is changed
Run the network logon service.

Net accounts [/forcelogoff: {minutes | no}] [/minpwlen: length] [/maxpwage: {days |
Unlimited}] [/minpwage: days] [/uniquepw: number] [/domain]
Net accounts [/Sync] [/domain]
Parameters
None
Enter the Net accounts without parameters. The current password settings, logon time limit, and domain information are displayed.

/Forcelogoff: {minutes | no}
Set the waiting time before the end user and server session when the user account or valid logon time expires. No option disabled
Force cancel. The default value of this parameter is no.
After/forcelogoff: minutes is specified, Windows NT minutes before it forces the user to exit the network minutes
, An alarm will be issued to the user. If there are opened files, Windows NT will warn users. If minutes is smaller
Two minutes later, Windows NT warned the user to log out of the network immediately.
/Minpwlen: Length
Set the minimum number of characters for the user account password. The value range is 0-14. The default value is 6.
/Maxpwage: {days | unlimited}
Set the maximum number of days for which the user account password is valid. The maximum number of days is not set for unlimited. /The number of days required for the maxpwage Option
Must be greater than/minpwage. The range is 1-49,710 days (unlimited ). The default value is 90 days.
/Minpwage: days
Set the minimum number of days that the user must keep the original password. The minimum time is not set for the value 0. The value range is 0-49,710 days.
The value is 0 days.
/Uniquepw: Number
You must change the password after the number of times before using the same password again. Permitted range
It is 0-8. The default value is 5.
/Domain
Perform this operation on the master domain controller of the current domain. Otherwise, only the operations are performed on the local computer.
This parameter is only used for Windows NT workstation computers in the Windows NT Server domain, Windows NT
The server computer performs operations on the master domain controller by default.
/Sync
When used for the primary domain controller, this command synchronizes all the backup domain controllers in the domain. When used to back up the domain controller, this command
To synchronize only the backup domain controller with the master domain controller. This command is only applicable to Windows NT Server domain members.
Computer.

Net computer

Add or delete computers from the domain database. This command is only available on computers running Windows NT Server.
Net computer/computername {/Add |/del}
Parameters
/Computername
Specifies the computer to be added to or deleted from the domain.
/Add
Add the specified computer to the domain.
/Del
Deletes a specified computer from the domain.

Net config

Displays the currently running configurable service, or displays and changes the settings of a service.
Net config [Service [Options]
Parameters
None
If you type net config without parameters, the list of configurable services is displayed.
Service
The Service (server or workstation) configured by using the net config command ).
Options
Service-specific options. For the complete syntax, see net config server or net config workstation.

Net config Server

The service settings of the server are displayed or changed when the service is running.
Net config server [/autodisconnect: time] [/srvcomment: "text"] [/hidden: {Yes | n
O}]
Parameters
None
Enter the net config server without parameters. The current configuration of the server service is displayed.
/Autodisconnect: Time
Sets the maximum idle time of a user session before disconnection. You can specify-1, indicating that the connection will never be disconnected. The value range is-1.
-65535 minutes. The default value is 15 minutes.
/Srvcomment: "text"
Add comments to the server. You can use the net view command to display the comments on the screen. Up to 48 comments
Character. The text must be enclosed in quotation marks.
/Hidden: {Yes | no}
Specifies whether the computer name of the server appears in the server list. Please note that an implicit server does not change this server
. The default value is no.

Net config Workstation

When the service is running, the settings of the services on the workstation are displayed or changed.
Net config workstation [/charcount: bytes] [/chartime: msec] [/charwait: sec]
Parameters
None
If you type net config workstation without parameters, the current configuration of the Local Computer is displayed.
/Charcount: bytes
Specifies the amount of data that Windows NT collects before sending data to a communication device. If/chartime: m is set at the same time
The SEC parameter. Windows NT runs according to the option that meets the conditions first. The value range is 0-65535 bytes. The default value is
16 bytes.
/Chartime: msec
Specify the time when Windows NT collects data before sending data to the communication device. If both/charcoun
T: bytes parameter. For Windows NT, it is run according to the option that meets the conditions first. The value range is 0-65535000 milliseconds.
The value is 250 milliseconds.
/Charwait: sec
Set the time Windows NT waits for the communication device to become available. The value range is 0-65535 seconds. The default value is 36.
00 seconds.

Net continue

Reactivate the suspended service.
Net continue service
Parameters
Service
Services that can continue running, including: File Server for Macintosh (this service is limited to Windows NT se
Rver), FTP Publishing Service, lpdsvc, Net Logon, Network DDE, Network DDE DSDM
, Nt lm Security Support Provider, Remoteboot (this service is limited to Windows NT Server ),
Remote Access Server, schedule, server, Simple TCP/IP Services, and workstation.

Net File

Displays the shared file names opened on a server and the number of locked files. This command can also close individual files and cancel the text
Lock.
Net file [ID [/close]
Parameters
None
Enter a net file without parameters to obtain the list of files opened on the server.
ID
File ID.
/Close
Close the opened file and release the lock record. Enter this command from the shared file server.

Net Group

Add, display, or change global groups in the Windows NT Server domain. This command is only in the Windows NT Server domain
.
Net group [groupname [/comment: "text"] [/domain]
Net group groupname {/Add [/comment: "text"] |/delete} [/domain]
Net group groupname username [...] {/Add |/delete} [/domain]
Parameters
None
Enter a net group without parameters to display the server name and server group name.
Groupname
The Group to add, expand, or delete. Only a group name is provided to view the list of users in the group.
/Comment: "text"
Add comments to the new or existing group. A comment can contain a maximum of 48 characters and enclose the comment in quotation marks.
/Domain
This operation is performed on the master domain controller of the current domain. Otherwise, the operation is performed on the local computer.
This parameter is only used for Windows NT workstation computers that are members of the Windows NT Server domain. Windo
By default, the ws NT server computer operates in the master domain controller.
Username [...]
The List displays one or more users to be added to or deleted from the group. Multiple User Name items are separated by spaces.
/Add
Add a group or user name to the group. You must use this command to create an account for the user added to the group.
/Delete
Delete a group or user name from the group.

NET Help

Provides a list of network commands and help topics, or provides help for specified commands or topics. Available Network commands listed in N
Refer to the "commands" window in "commands.
NET Help [command]
Net command {/help | /?}
Parameters
None
Type "net help" without parameters to display the command list and help topic for help.
Command
Do not use net as part of the command.
/Help
Displays the help text.
/?
Displays the correct syntax of the command.

Net helpmsg

Provides help for Windows NT error messages.
Net helpmsg message #
Parameters
Message #
The four-digit code for the Windows NT message that requires help.

Net localgroup

Add, display, or change a local group.
Net localgroup [groupname [/comment: "text"] [/domain]
Net localgroup groupname {/Add [/comment: "text"] |/delete} [/domain]
Net localgroup groupname [...] {/Add |/delete} [/domain]
Parameters
None
If you type a net localgroup without parameters, the server name and the Local Group Name of the computer are displayed.
Groupname
Name of the Local Group to be added, expanded, or deleted. You can only provide groupname to view the global user list or local group
Group.
/Comment: "text"
Add comments to new or existing groups. The maximum length of the annotated text is 48 characters and enclosed in quotation marks.
/Domain
Perform operations in the master domain controller of the current domain. Otherwise, only the operations are performed on the local computer.
This parameter is only applicable to Windows NT workstation computers in the Windows NT Server domain. Windows n
The T server computer operates in the master domain controller by default.
Name [...]
Lists one or more user names or group names to be added to or deleted from a local group.
Separated by spaces. It can be a local user, another domain user, or a global group, but not another local group. For other domains
To add a domain name (for example, salesralphr) before the user name ).
/Add
Add the global group name or user name to the local group. Before you use this command to add a user or global group to a local group
You must create an account for it.
/Delete
Delete the group name or user name from the local group.

Net Name

Add or delete a message name (sometimes called an alias) or display a list of names of messages received by the computer. To use net Nam
E command. The messenger service must be run on the computer.
Net name [name [/Add |/delete]
Parameters
None
Enter a net name without parameters to list the currently used names.
Name
The name of the received message. The name can contain up to 15 characters.
/Add
Add the name to the computer. /Add is optional. Type net name and net name/.
Dd is the same.
/Delete
Delete a name from the computer.

Net pause

Pause a running service.
Net pause Service
Parameters
Service
The following services: File Server for Macintosh (Windows NT Server only), FTP publishi
Ng service, lpdsvc, Net Logon, Network DDE, Network dde dsdm, nt lm Security sup
Port provider, Remoteboot (Windows NT Server only), remote access server, Sch
Edule, server, Simple TCP/IP Services, or workstation.

Net print

Display or control print jobs and print queues.
Net print/computername sharename
Net print [/computername] job # [/hold |/release |/delete]
Parameters
Computername
The name of the computer that shares the printer queue.
Sharename
Print the queue name. When computername and sharename are included, use the backslash () to separate them.
Job #
ID assigned to the print job in the printer queue. One or more printer queues are printed for each computer
Unique id of an assignment. If a job number is used in a shared printer queue, it cannot be specified for other jobs or
Can be assigned to jobs in other printer queues.
/Hold
When job # is used, wait for the print job in the printer queue. Print jobs stay in the printer queue, and other
A print job can only enter after it is released.
/Release
Release the reserved print job.
/Delete
Delete a print job from the printer queue.

Net send

Send messages to other users, computers, or communication names on the network. To receive messages, you must run the messenger service.
Net send {name | * |/domain [: Name] |/users} message
Parameters
Name
The user name, computer name, or communication name of the message to be sent. If the computer name contains null characters, use quotation marks
.
*
Send messages to all group names.
/Domain [: Name]
Sends messages to all names in the computer domain. If the name is specified, the message is sent to all
Name.
/Users
Send messages to all users connected to the server.
Message
The text sent as a message.

Net session

Lists or disconnects sessions of local computers and clients connected to them.
Net session [/computername] [/delete]
Parameters
None
Enter a net session without parameters to display all session information with the local computer.
/Computername
Identifies the computer on which the session is to be listed or disconnected.
/Delete
End the session with the/computername computer and close all open files on the computer during this session. If omitted
The/computername parameter cancels all sessions with the local computer.

NET Share

Creates, deletes, or displays shared resources.
NET Share sharename
NET Share sharename = driveath [/users: Number |/unlimited] [/remark: "text"]
NET Share sharename [/users: Number | unlimited] [/remark: "text"]
NET Share {sharename | driveath}/delete
Parameters
None
If you type net share without parameters, information about all the shared resources on the local computer is displayed.
Sharename
Is the Network Name of the shared resource. Type the net share command with sharename to display only the shared information.
Driveath
Specifies the absolute path of the shared directory.
/Users: Number
Set the maximum number of users who can access Shared resources at the same time.
/Unlimited
The number of users accessing shared resources at the same time is not limited.
/Remark: "text"
Add comments about resources. Enclose the comments in quotation marks.
/Delete
Stop sharing resources.

Net start

Start the service, or display the list of started services. If the service name is two or more words, such as Net Logon or
Computer Browser, you must use quotation marks ..
Net start [Service]
Parameters
None
Enter a Net start without parameters to display the list of running services.
Service
Includes the following services: Alerter, client service for NetWare, ClipBook server, and computer br
Owser, DHCP Client, directory replicator, Eventlog, FTP Publishing Service,
Lpdsvc, messenger, Net Logon, Network DDE, Network dde dsdm, Network Monitor
Ing Agent, nt lm Security Support Provider, Ole, Remote Access Connection man
Ager, remote access isnsap service, remote access server, Remote Procedure ca
LL (RPC) locator, Remote Procedure Call (RPC) service, schedule, server, Sim
Ple TCP/IP Services, SNMP, spooler, TCP/IP NetBIOS Helper, ups and workstation
.
The following services are only available for Windows NT Server: File Server for Macintosh, Gateway Servic
E for NetWare, Microsoft DHCP server, Print Server for Macintosh, Remoteboot, wi
Ndows Internet Name Service.

Net statistics

Displays statistical records of local workstations or server services.
Net statistics [workstation | Server]
Parameters
None
If you type net statistics without parameters, the available running services of the statistical information are listed.
Workstation
Displays the statistics of the local workstation service.
Server
Displays statistics of local server services.

Net stop

Stop the Windows NT network service.
Net stop service
Parameters
Service
Includes the following services: Alerter (alert), client service for NetWare (Netware Client Service)
ClipBook server, Computer Browser, directory R
Eplicator, FTP Publishing Service, lpdsvc,
Messenger, Net Logon, Network DDE, Network DDE d
SDM (Network dde dsdm), network monitor agent (Network Monitoring Agent), nt lm Security supp
ORT provider (provided by nt lm Security Support), Ole (Object link and embedding), remote access Conne
Ction Manager (Remote Access Connection Manager) and remote access isnsap Service (Remote Access to ISNs)
AP Service), remote access server (remote access server), Remote Procedure Call (RPC) L
Ocator (Remote Procedure Call Locator), Remote Procedure Call (RPC) Service (Remote Procedure Call server)
Service), Schedule (scheduling), server (server), Simple TCP/IP Services (Simple TCP/IP server)
Service), SNMP, Spooler (background print program), TCP/IP NetBIOS Helper (TCP/IP NetBIOS Helper)
With), ups and workstation ).
The following services are only available in Windows NT Server: File Server for Macintosh, Gateway servi
CE for NetWare, Microsoft DHCP server, Print Server for Macintosh, Remoteboot, W
Indows Internet Name Service.

NET Time

Synchronize the clock of a computer with that of another computer or domain. When the/set parameter is not used, the other gauge is displayed.
The time of the computer or domain.
Net time [/computername |/domain [: Name] [/set]
Parameters
/Computername
The name of the server to be checked or synchronized.
/Domain [: Name]
Specifies the domain to be synchronized with it.
/Set
Synchronize the clock of the current computer with the clock of the specified computer or domain.

Net use

Connect the computer or disconnect the computer from the shared resources, or display the connection information of the computer. This command also controls permanent
Network connection.
Net use [devicename | *] [/computernamesharename [volume] [Password | *] [/user
: [Domainname] username] [[/delete] | [/persistent: {Yes | no}]
Net use devicename [/home [Password | *] [/delete: {Yes | no}]
Net use [/persistent: {Yes | no}]
Parameters
None
If you type net use without parameters, network connections are listed.
Devicename
Specify the name of the resource to be connected or the name of the device to be disconnected. There are two types of device names: disk drive (D: to Z :) and
Printer (LPT1: To lpt3 ). If you enter an asterisk instead of a specified device name, assign the next available device name.
/Computernamesharename
The name of the server and the shared resource. If the computer name contains blank characters, use quotation marks ("" to double backslash and calculate
Host Name. The computer name can be 1-15 characters in length.
Volume
Specify the NetWare volume on the server. To connect to the NetWare server, you must install and run the Netware Client.
Service (Windows NT Workstation) or Netware gateway service (Windows NT Server ).
Password
The password used to access shared resources.
*
Enter the password. When you type a password in the password prompt line, the password is not displayed.
/User
Specify another user for connection.
Domainname
Specify another domain. For example, net use D:/servershare/User: adminmariel connects to Mariel, as shown in figure
Same as connecting from admin domain. If the domain is omitted, the current region is used.
Username
Specify the logon user name.
/Home
Connect users to their home directories.
/Delete
Cancels a specified network connection. If you specify a connection with a star number, all network connections are canceled.
/Persistent
Controls the use of permanent network connections. The default setting is the previous one. The connection without a device is not permanent.
Yes
Save all established connections and restore them at next login.
No
Do not save the established connection and secondary connection, and restore the existing connection at the next login. Use the/delete toggle to remove permanent
Persistent connections.

Net user

Add or change user accounts or display user account information.
Net user [username [Password | *] [Options] [/domain]
Net user username {password | *}/Add [Options] [/domain]
Net user username [/delete] [/domain]
Parameters
None
Enter a net user without parameters to view the user account list on the computer.
Username
Add, delete, change, or view user account names. The user account name can contain a maximum of 20 characters.
Password
Assign or change the password for the user account. The password must meet the requirements set in the Net accounts command/minpwlen option.
Minimum parameter. It can contain a maximum of 14 characters.
*
The system prompts you to enter the password. When you type a password in the password prompt line, the password is not displayed.
/Domain
Perform operations in the master domain controller of the computer's primary domain.
This parameter is only available on Windows NT workstation computers with Windows NT Server domain members. Default
The Windows NT Server computer operates on the master domain controller.
Note: This action occurs in the master domain controller of the computer's primary domain. It may not be an alias domain.
/Add
Add a user account to the user account database.
/Delete
Delete a user account from the user account database.
The options are as follows:
/Active: {No | Yes}
Enable or disable user accounts. If the user account is not activated, the user cannot access resources on the computer. The default value is Y.
ES (activation ).
/Comment: "text"
Provides user account comments. The comment can contain up to 48 characters, and the text is enclosed in quotation marks.
/Countrycode: NNN
Use the country code of the operating system to provide the specified language file for user help and error message files. 0 indicates the default value
Country code.
/Expires: {date | never}
If date is set, the user account will expire. Never does not set a time limit for the user account. Expiration date based on
The/countrycode value can be in the following format: mm/DD/YY, dd/mm/yy, mmm, DD, or yy. Note that the account is
It expires at the start of the date. The month can be a combination of digits, full names, or three letters. The year can be two or four digits.
Comma or diagonal line (do not use spaces) to distinguish the parts of a date. If YY is omitted
Year (based on the computer clock ). For example, if you enter
The following date items are the same: Jan, 9
1/9/95
January, 9,1995
1/9
/Fullname: "name"
Specify the full name of the user instead of the user name. Enclose the name in quotation marks.
/Homedirath
Set the path of the user's home directory. This path must exist.
/Homedirreq: {Yes | no}
Set whether the home directory is required.
/Passwordchg: {Yes | no}
Specifies whether the user can change his or her password. The default value is yes.
/Passwordreq: {Yes | no}
Specifies whether a password is required for the user account. The default value is yes.
/Profilepath: [path]
Set the path of the user login configuration file. The path name points to the Registry configuration file.
/Scriptpathath
Set the path for the user login script. Path cannot be an absolute path;
PATH is relative to % SystemRoot % system32replimportscripts :.
/Times: {times | all}
Specifies the time when the user is allowed to use the computer. The value of times is day [-day] [, day [-day], and time [-time ].
] [, Time [-time]. The increment is limited to one hour. Days can be the full name or abbreviation (M, T, W, Th, F, SA, S
U ). Hours can be in 12-hour or 24-hour format. For 12-hour values, use am, PM, A.M, and P.M
. All indicates that users can always log on. A null value indicates that the user cannot log on. Use commas to separate dates and times.
Use semicolons (M, 4am-5pm; t, 1pm-3pm) for the period and date ). Do not use spaces when specifying/times.
/Usercomment: "text"
Ask the Administrator to add or change the "user comment" of the account ". Enclose the text in quotation marks.
/Workstations: {computername [,...] | *}
List the workstations on which up to eight users can log on to the network. Multiple items in the list are separated by commas. If/workstat
Ions does not have a list, or if the list is an asterisk (*), you can log on to any computer.

Net View

Displays a list of domains, computers, or shared resources of a specified computer.
Net view [/computername |/domain [: domainname]
Net view/Network: NW [/computername]
Parameters
None
If you type a net view without parameters, the computer list of the current domain is displayed.
/Computername
Specifies the computer on which the shared resources are to be viewed.
/Domain [: domainname]
Specify the domain for which you want to view the available computers. If domainname is omitted, all domains of the network are displayed.
/Network: NW
Displays all available servers in the NetWare network. If the computer name is specified, the count is displayed in the NetWare network.
Available computing resources. You can also use this switch to specify other networks added to the system.

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.