Networking / Beginners

The Net Localgroup command

This command lets you add, display, or change local groups. This command has a number of different syntaxes, depending on how you intend to use it. To display information about a local group or to change a local group's comment, use this syntax:

net localgroup groupname [/comment:"text"] [/domain]

To create a new group, use this syntax:

net localgroup groupname /add [/comment:"text"] [/domain]

To delete a group, use this syntax:

net localgroup groupname /delete [/domain]

Finally, to add users to or remove users from a group, use this syntax:

net localgroup groupname username[ ...] {/add | /delete} [/domain]

The following paragraphs describe the parameters that you can use with the Net Localgroup command:

  • Groupname: The name of the group to add, change, or delete. If you specify this parameter and no others, a list of users in the group appears.
  • Comment: Specifies a comment for the group. The comment can be up to 48 characters in length and should be enclosed in quotation marks.
  • Domain: Specifies that the operation should be performed on the primary domain controller rather than on the local computer.
  • Add: Creates a new group or adds users to an existing group. Before you add a user to a group, you must first create a user account for the user.
  • Delete: Removes a group or removes users from the group.
  • Username: One or more usernames to be added to or removed from the group. If you list more than one name, separate the names with spaces.

This example lists all the local groups:

C:\>net localgroup

This example adds a local group named Admin:

C:\>net localgroup Admin /add

This example adds three users to the Admin local group:

C:\>net localgroup Admin Ward Wally June /add

This example lists the users in the Admin group:

C:\>net localgroup Admin

The Net Name command

This command creates or removes an alias that can be used to send messages to the computer, or it lists any existing aliases. Here's the syntax:

net name [name {/add|/delete}]

You can use the following parameters with the Net Name command:

  • Name: The name of the alias to create or remove.
  • Add: Creates the alias.
  • Delete: Removes the alias.

Use Net Name to specify a name for receiving messages. You must start the Messenger service before you can use Net Name. Each messaging name must be unique on the network. Names created with Net Name are strictly for messaging - not for group names. Windows XP uses three name types. To list the current names for a computer, use the Net Name command like this:

C:\>net name
Name
--------------------------------------------------------
DOUG
DOUG LOWE
The command completed successfully.

To add the name T1000 to your computer, use this command:

C:\>net name T1000 /add

To delete the name, use this command:

C:\>net name T1000 /delete

The Net Pause command

This command temporarily pauses a service. It's a good idea to pause a service for a while before you stop the service altogether. That gives users who are currently using the service a chance to finish up any pending tasks, while at the same time preventing other users from beginning new sessions with the service. To reactivate the service later, use the Net Continue command.

The syntax to pause a service is:

net pause service

Here are some typical services you can pause:

  • Netlogon: The Net Logon service.
  • Schedule: The Task Scheduler service.
  • Server: The Server service.
  • Workstation: The Workstation service.

Here's an example that pauses the Workstation service:

CL>net pause workstation

If the service name has embedded spaces, enclose the service name in quotation marks. For example, this command pauses the NT LM Security Support Provider service:

C:\>net pause "nt lm security support provider"
[Previous] [Contents] [Next]