The Usage Encyclopedia of Windows NET commands

Source: Internet
Author: User
Tags net command net time ole snmp time and date time limit typing net net send

Many Windows NT network commands start with net. These net commands have some common properties:
by typing net/? All available net commands can be consulted.
You can get the syntax help for the net command at the command line by typing the net HELP command. For example, to get the net Acco
Unts the command, type NET help accounts.
All NET commands accept options/Yes and/no (can be abbreviated to/Y and/N). /y automatically answers "yes" to any interaction prompts generated by the command, and/n answers "no". For example, net stop server usually prompts you to confirm that all services are terminated according to the Server service, and net stop server/y automatically answers yes and shuts down the server service.

Net Accounts

Update user account Database, change password and login requirements for all accounts. You must run the Network Logon service on the computer that changes the account parameters.
NET accounts [/forcelogoff:{minutes | no}] [/minpwlen:length] [/maxpwage:{days |
Unlimited}] [/minpwage:days] [/uniquepw:number] [/domain]
NET accounts [/sync] [/domain]
Parameters
No
Type net accounts with no parameters, displaying current password settings, logon time limits, and domain information.
/forcelogoff:{minutes | no}
Sets the wait time before a user or server session is terminated when a user account or valid logon time expires. The no option prohibits forced logoff. The default setting for this parameter is no. After/forcelogoff:minutes is specified, Windows NT alerts the user before it forces the user to quit the network minutes minutes. If there are open files, Windows NT warns the user. If minutes is less than two minutes, Windows NT warns users to log off immediately from the network.
/minpwlen:length
Sets the minimum number of characters for a user account password. The allowable range is 0-14, and the default value is 6.
/maxpwage:{days | unlimited}
Set the maximum number of days a user account password is valid. Unlimited does not set the maximum number of days. The number of days for the/maxpwage option must be greater than/minpwage. The allowable range is 1-49, 710 days (unlimited). The default value is 90 days.
/minpwage:days
Set the minimum number of days a user must keep the original password. The 0 value does not set the minimum time. The allowable range is 0-49, 710 days, and the default value is 0 days.
/uniquepw:number
When a user is required to change a password, the same password must be reused after number times. The allowable range is 0-8. The default value is 5.
/domain
Perform this operation on the primary domain controller of the current domain. Otherwise, the operation is performed only on the local computer.
This parameter is used only for Windows NT Workstation computers in Windows NT Server domains, and the Windows NT Server computer defaults to performing operations on the primary domain controller.
/sync
When used with the primary domain controller, this command synchronizes all backup domain controllers in the domain, and when used to back up the domain controller, this command synchronizes only the backup domain controller with the primary domain controller. This command applies only to computers that are members of Windows NT Server domains.

Net Computer

Add or remove computers from the domain database. This command is available only on computers running Windows NT Server.
NET Computer/computername {/add |/del}
Parameters
/computername
Specifies the computer to be added to or removed from the domain.
/add
Adds the specified computer to the domain.
/del
Deletes the specified computer from the domain.

Net Config

Displays the currently running configurable service, or displays and changes the settings for a service.
NET config [service [options]]
Parameters
No
Typing a net config with no parameters displays a list of configurable services.
Service
A service (server or workstation) that is configured through the Net config command.
Options
Specific options for the service. Complete syntax See net config server or net config workstation.

Net Config Server

Displays or changes the server's service settings when the service is running.
NET config server [/autodisconnect:time] [/srvcomment: "Text"] [/hidden:{yes | N
o}]
Parameters
No
Type a net config server with no parameters to display the current configuration of the Server service.
/autodisconnect:time
Sets the maximum time value that the user session is idle before disconnecting. You can specify-1 to indicate that the connection will never be disconnected. The allowable range is 1-65,535 minutes and the default value is 15 minutes.
/srvcomment: "Text"
Add comments to the server, which can be displayed on the screen by using the net VIEW command. Note up to 48 characters and enclose the text in quotation marks.
/hidden:{yes | no}
Specifies whether the computer name of the server appears in the server list. Note that the implied server does not alter the permissions of the server. The default is No.

Net Config Workstation

Displays or changes the settings for each service on the workstation when the service is running.
net config workstation [/charcount:bytes] [/chartime:msec] [/charwait:sec]
Parameters
No
Type net config workstation with no parameters to display the current configuration of the local computer.
/charcount:bytes
Specifies the amount of data that Windows NT collects before sending data to a communication device. If you set the/CHARTIME:MSEC parameter at the same time, Windows NT runs by the option that first satisfies the criteria. The allowable range is 0-65535 bytes, and the default value is 16 bytes.
/chartime:msec
Specifies the time that Windows NT collects data before sending it to a communications device. If you set the/charcount:bytes parameter at the same time, Windows NT runs by the option that first satisfies the criteria. The allowable range is 0-65535000 milliseconds, and the default value is 250 milliseconds.
/charwait:sec
Sets the time Windows NT waits for a communication device to become available. The allowable range is 0-65,535 seconds, and the default value is 3,600 seconds.

Net Continue

Reactivate the suspended service.
NET Continue Service
Parameters
Service
Services that can continue to run, including: File Server for Macintosh (this service is limited to Windows NT server), 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,serve R,simple TCP/IP services and workstation.


Net File

Displays the number of all open shared file names and locked files on a server. This command can also close individual files and cancel file locking.
NET file [ID [/close]]
Parameters
No
Type net file with no parameters to get a list of open files on the server.
Id
The file identification number.
/close
Closes the open file and releases the locked record. Type the command from the server on which you are sharing files.

Net Group

Add, display, or change global groups in a Windows NT Server domain. This command is available only in Windows NT Server domains.
NET group [groupname [/comment: "text"]] [/domain]
NET group groupname {/add [/comment: "Text"] | /delete} [/domain]
NET group groupname username [...] {/add |/delete} [/domain]
Parameters
No
Type a net group with no parameters to display the server name and the server's group name.
GroupName
The group to add, expand, or delete. You can view a list of users in a group by providing only one group name.
/comment: "Text"
Add a comment for a new or existing group. Note can be up to 48 characters and enclose the annotation text in quotation marks.
/domain
This operation is performed on the primary domain controller of the current domain, otherwise the operation is performed on the local computer.
This parameter is used only for Windows NT Workstation computers that are members of a Windows NT Server domain. The Windows NT Server Computer defaults to operating on the primary domain controller.
Username[...]
The list displays one or more users to be added to or removed from the group. Use spaces to separate multiple user name entries.
/add
Add a group or add a user name to a group. You must use this command to establish an account number for users who are added to the group.
/delete
Delete the group or remove the user name from the group.

Net Help

Provides a list of network commands and Help topics, or provides help for specifying commands or topics. The available network commands are listed in the Commands window in the command reference under N.
NET HELP [command]
NET Command {/help |/?}
Parameters
No
Type NET help with no parameters to display a list of commands and help topics that can be helped.
Command
Commands that require help, do not use net as part of the command.
/help
Provides a way to display help text choices.
/?
Displays the correct syntax for the command.

Net helpmsg

Provides help for Windows NT error messages.
NET Helpmsg message#
Parameters
message#
Four-bit code for Windows NT messages that require their help.

Net localgroup

Add, show, or change local groups.
net localgroup [groupname [/comment: "text"]] [/domain]
net localgroup groupname {/add [/comment: "Text"] | /delete} [/domain]
net localgroup groupname name [...] {/add |/delete} [/domain]
Parameters
No
Type net localgroup with no parameters displays the server name and the local group name of the computer.
GroupName
The name of the local group to add, expand, or delete. Only GroupName is available to view global groups in the user list or local group.
/comment: "Text"
Adds a comment to a new or existing group. The maximum length of the annotation text is 48 characters and is enclosed in quotation marks.
/domain
Actions are performed on the primary domain controller of the current domain, otherwise only on the local computer.
This parameter applies only to Windows NT Workstation computers in Windows NT Server domains. The Windows NT Server Computer defaults to operating on the primary domain controller.
Name [...]
Lists one or more user or group names to be added to the local group or removed from the local group, separated by a space between multiple user names or group names. Can be a local user, another domain user, or a global group, but not another local group. If you are a user of another domain, add a domain name (for example, SALESRALPHR) before the user name.
/add
Adds a 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
Account must be established for it.
/delete
Remove the group or user name from the local group.

Net Name

Add or remove a message name (sometimes called an alias), or display a list of names that the computer receives messages from. To use the net name command, the Messenger service must be running on your computer.
NET name [name [/add |/delete]]
Parameters
No
Type net name without parameters lists the name that is currently in use.
Name
Specifies the name of the receive message. The name is up to 15 characters.
/add
Add the name to your computer. /add is optional, type NET name name is the same as type net name Name/add.
/delete
Remove the name from the computer.

Net Pause

Pause a service that is running.
NET Pause Service
Parameters
Service
refers to the following services: File Server for Macintosh (Windows NT server only), FTP Publishing Service, lpdsvc, Net Logon, network DDE, network DDE ds DM, nt LM security Support provider, Remoteboot (Windows NT Server only), remote access Server, schedule, Server, simple TCP/IP s ervices or workstation.

Net Print

Displays or controls print jobs and print queues.
NET Print/computername sharename
NET print [/computername] job# [/hold |/release |/delete]
Parameters
ComputerName
The computer name of the shared printer queue.
ShareName
print queue name. When ComputerName and sharename are included, use a backslash () to separate them.
job#
Identification number assigned to the print job in the printer queue. A computer that has one or more printer queues assigns a unique identification number to each print job. If a job number is used in a shared printer queue, it cannot be assigned to another job, nor can it be assigned to a job in another printer queue.
/hold
When using job#, the print job waits in the printer queue. The print job stays in the printer queue, and other print jobs cannot enter until the job is released.
/release
Releases a reserved print job.
/delete
Deletes a print job from the printer queue.

Net Send

Sends a message to another user, computer, or communication name 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 to receive the message to be sent. If the computer name contains a null character, enclose it in quotation marks ("").
*
Sends a message to all the names in the group.
/domain[:name]
Sends a message to all the names in the computer domain. If name is specified, the message is sent to all names in the specified field or group.
/users
Sends a message to all users who are connected to the server.
Message
The text sent as a message.

Net session

Lists or disconnects the session of the local computer and the client with which it is connected.
NET session [/computername] [/delete]
Parameters
No
Type a net session with no parameters to display information about all sessions with the local computer.
/computername
Identifies the computer on which you want to list or disconnect sessions.
/delete
End all open files for the computer during the session with the/computername computer and close this session. If the/computername argument is omitted, all sessions with the local computer are canceled.

Net Share

Create, delete, or display shared resources.
NET share sharename
NET share Sharename=drive:path [/users:number |/unlimited] [/remark: "Text"]
NET share sharename [/users:number | unlimited] [/remark: "Text"]
NET share {sharename | drive:path}/delete
Parameters
No
Typing a net share with no parameters displays information about all the shared resources on the local computer.
ShareName
is the network name of the shared resource. Type the net share command with sharename to display only the shared information.
Drive:path
Specifies the absolute path to the shared directory.
/users:number
Sets the maximum number of users who can access a shared resource at the same time.
/unlimited
Does not limit the number of users who concurrently access shared resources.
/remark: "Text"
Add a comment about the resource, and the comment text is enclosed in quotation marks.
/delete
Stop sharing resources.

Net Start

Start the service, or display a list of started services. If the service name is two or two more words, such as Net Logon or computer Browser, you must enclose it in quotation marks (") ...
net start [service]
Parameters
No
Type net start with no parameters to display a list of running services.
Service
Includes the following services: Alerter, Client Service for NetWare, ClipBook server, Computer Browser, DHCP client, directory replicator, EventLog, FTP Publishing Service, lpdsvc, messenger, Net Logon, network DDE, network dde dsdm, network monitoring agent, nt LM Securi Ty support provider, OLE, remote Access Connection Manager, remote access ISNSAP service, remote access server, remote Pro Cedure Call (RPC) locator, remote procedure call (RPC) service, schedule, server, simple TCP/IP services, SNMP, spooler, TC P/ip NetBIOS Helper, UPS and workstation

The following services are available only under Windows NT server: File Server for Macintosh, Gateway Service for NetWare, Microsoft DHCP server, print Server for Macintosh, remoteboot, Windows Internet Name Service.

Net Statistics

Displays statistics logging for the local workstation or Server service.
NET statistics [workstation | server]
Parameters
No
Type NET statistics with no parameters lists the running services whose statistics are available.
Workstation
Displays statistics about the local Workstation service.
Server
Displays statistics about the local server service.

Net Stop

Stop the Windows NT Network Service.
NET stop Service
Parameters
Service
Includes the following services: Alerter (alerts), Client Service for NetWare (NetWare Client Services), ClipBook Server (ClipBook server), Computer browser (Computer browser), Directory Replicator (Directory replicator), FTP Publishing Service (FTP) (FTP Publishing Service), lpdsvc, Messenger (Messenger), Net Logon (network logon), network DDE (Network dde), Network dde dsdm (Network dde DSDM), Network Monitor Agent (Network monitoring agents), NT LM security Support provider (provided by NT LM secure support), OLE (Object Linking and Embedding), Remote Access Connection Manager (remoted Access Connection Manager), Remote access ISNSAP service (remoted Access ISNSAP services), Sqlremote access Server (Remote access server), remote procedure call (RPC) locator (remote procedure invocation locator), Sqlremote procedure calls (RPC) service (Remote Procedure call services), Schedule (Dispatch), Server (server), simple TCP/IP services (easy TCP/IP service), SNMP, spooler (print spooler), TCP/IP NetBIOS Helper (TCP/IP NETBIOS aids), UPS, and workstation (workstations).
The following services are available only in Windows NT server: File Server for Macintosh, Gateway Service for NetWare, Microsoft DHCP server, print Server for Macintosh, remoteboot, Windows Internet Name Service
Synchronizes the computer's clock with the time of another computer or domain. When used without the/set parameter, the time of another computer or domain is displayed.
NET TIME [/computername |/domain[:name]] [/set]
Parameters
/computername
The name of the server to check or synchronize.
/domain[:name]
Specifies the domain to synchronize with time.
/set
Synchronizes the computer clock with the specified computer or domain clock.

Net use

Connect the computer or disconnect the computer from the shared resource, or display the connection information for the computer. This command also controls persistent network connections.
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
No
Type net use with no parameters lists the network connections.
DeviceName
Specifies the name of the resource to which you want to connect or the name of the device to disconnect. There are two types of device names: Disk drives (D: to Z:) and Printers (LPT1: to LPT3). If you type an asterisk instead of the specified device name, assign the next available device names.
/computernamesharename
The name of the server and the shared resource. If the computer name contains white space characters, enclose the double backslash and the computer name in quotation marks (""). The computer name can be 1-15 characters long.
Volume
Specifies the NetWare volume on the server. To connect to a NetWare server, you must install and run the NetWare Client Service (Windows NT Workstation) or NetWare Gateway Service (Windows NT Server).
Password
Access the password for the shared resource.
*
Prompts to type a password. When you type a password in the password prompt line, the password is not displayed.
/user
Specifies a different user to connect to.
DomainName
Specifies another domain. For example, net use D:/servershare/user:adminmariel connects users Mariel as if they were connected from the admin domain. If the field is omitted, the current logon domain is used.
Username
Specifies the user name for the login.
/home
Connect users to their host directory.
/delete
Cancels the specified network connection. If the user specifies the connection with an asterisk, all network connections are canceled.
/persistent
Controls the use of permanent network connections. The default is the last used setting. A device-less connection is not permanent.
Yes
Saves all established connections and restores at the next logon.
No
The established and secondary connections are not saved, and the existing connections are restored at the next logon. Use the/delete switch to cancel the permanent connection.

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
No
Type net user with no parameters to view a list of user accounts on the computer.
Username
Add, remove, change, or view user account names. The user account name can be up to 20 characters.
Password
Assign or change a password for a user account. The password must meet the minimum parameters set in the net accounts command/minpwlen option. Up to 14 characters.
*
Prompts for a password. When you type a password in the password prompt line, the password is not displayed.
/domain
Perform 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 a Windows NT Server domain. By default, Windows NT Server Computers perform operations on the primary domain controller.
Note: This action occurs on the primary domain controller in the computer's primary domain. It may not be a logon domain.
/add
Add a user account to the user account database.
/delete
Deletes a user account from the user account database.
The options are as follows:
/active:{no | yes}
Enable or disable user accounts. If you do not activate a user account, users cannot access resources on the computer. The default value is Yes (active).
/comment: "Text"
Provides a comment for the user account. The annotation can be up to 48 characters long, with the text 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 information files. A value of 0 indicates the default country code.
/expires:{date | never}
Setting date will cause the user account to expire and never not set a time limit on the user account. The expiration date can be in the following format depending on the/countrycode value: Mm/dd/yy, dd/mm/yy or MMM, DD, yy. Note that the account expires at the beginning of the specified date. A month can be a number, full name, or three-letter spelling. The year can be two-or four-digit, using commas or slashes (not spaces) to distinguish the parts of the date. If YY is omitted, the next year (according to the computer's clock) is used for that date. For example, if you enter the following date items between January 10, 1994 and January 8, 1995, they are the same: jan,9 1/9/95
january,9,1995
1/9
/fullname: "Name"
Specify the user's full name instead of the user name. Enclose the name in quotation marks.
/homedir:path
Sets the path of the user host directory. The path must exist.
/homedirreq:{yes | no}
Sets whether the host 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 the user account requires a password, and the default value is yes.
/profilepath:[path]
Sets the path to the user logon profile. The pathname points to the registry configuration file.
/scriptpath:path
Sets the path for the user logon script. Path cannot be an absolute path;
Path is a relative path relative to the%systemroot%system32replimportscripts:.
/times:{times | all}
Specify when users are allowed to use the computer. The Times value is expressed as day[-day][, Day[-day]], time[-time][, Time[-time], and the increment is limited to one hour. Days can be full or abbreviated (M, T, W, Th, F, Sa, Su). Hours can be a 12-hour or 24-hour system. For 12-hour values, use AM, PM, or a.m, p.m. All indicates that the user can always log on. A null value indicates that the user can never log on. Separate the date and time with commas, separating the time and date units with semicolons (for example, m,4am-5pm; T,1PM-3PM). Do not use spaces when specifying/times.
/usercomment: "Text"
Have the administrator add or change the user annotation for the account number. Enclose the text in quotation marks.
/workstations:{computername[,...] | *}
Lists workstations for up to eight users who can log on to the network. Separate multiple items in the list with commas. If/workstations does not have a list, or if the list is an asterisk "*", the user can log on from any computer.

Net View

Displays a list of domains, lists of computers, or shared resources for a specified computer.
NET view [/computername |/domain[:d Omainname]]
NET VIEW/NETWORK:NW [/computername]
Parameters
No
Type net view with no parameters displays a list of computers in the current domain.
/computername
Specifies the computer for which you want to view shared resources.
/domain[:d Omainname]
Specifies 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 you specify a computer name, the available resources for that computer in the NetWare network are displayed. You can also use this switch to specify other networks that are added to the system.
References: http://www.f81.net/Article/Class51/Class20/Class22/200401/783_2.htm

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.