Net (command)/Localgroup

From Wikiversity
Jump to navigation Jump to search

Net is a Windows command used to view and modify network settings. These activities will show you how to use the net localgroup command.

Note: To complete this activity, you must have an administrative user account or know the username and password of an administrator account you can enter when prompted.

Preparation[edit]

To prepare for this activity:

  1. Start Windows.
  2. Log in if necessary.

Activity 1 - View Local Groups[edit]

To view local groups on your computer:

  1. Open an elevated/administrator command prompt.
  2. Type net localgroup and press Enter.
  3. Observe the list of local groups on your computer.

Activity 2 - View Users in a Local Group[edit]

To view users in a local group:

  1. Type net localgroup groupname, where groupname is the name of the group you want to list. For example, if the group name is Administrators, you would type net localgroup Administrators. Then press Enter.
  2. Observe the list of users in the local group.

Activity 3 - Add a Local Group[edit]

To add a local group to your computer:

  1. Type net localgroup groupname /add, where groupname is the name of the group you want to add. For example, if the group name is Accounting, you would type net localgroup Accounting /add. Then press Enter.
  2. Type net localgroup and press Enter to confirm the group has been added.

Activity 4 - Add a User to a Local Group[edit]

To add a user to a local group:

  1. Type net user and press Enter to view a list of user accounts on your computer.
  2. Type net localgroup groupname username /add, where username is the name of the existing user you want to add and groupname is the name of the group you want to add them to. For example, if the group name is Accounting and the username is Bill, you would type net localgroup Accounting Bill /add. Then press Enter.
  3. Type net localgroup groupname, where groupname is the name of the group you added the user to, and press Enter to confirm the user has been added to the group.

Activity 5 - Remove a User from a Local Group[edit]

To remove a user from a local group:

  1. Type net localgroup groupname username /delete, where username is the name of the user you want to remove and groupname is the name of the group you want to remove them from. For example, if the group name is Accounting and the username is Bill, you would type net localgroup Accounting Bill /delete. Then press Enter.
  2. Type net localgroup groupname, where groupname is the name of the group you removed the user from, and press Enter to confirm the user has been removed from the group.

Activity 6 - Delete a Local Group[edit]

To delete a local group from your computer:

  1. Type net localgroup and press Enter to view local groups on your computer.
  2. Type net localgroup groupname /delete, where groupname is the name of the group you wish to delete. For example, if the groupname is Accounting, you would type net localgroup Accounting /delete. Then press Enter.
  3. Type net localgroup and press Enter to confirm the local group has been deleted.
  4. Close the command prompt to complete this activity.

Readings[edit]

References[edit]