No announcement yet.

NET GROUP command on non Domain Controller

  • Filter
  • Time
  • Show
Clear All
new posts

  • NET GROUP command on non Domain Controller

    Hello all,

    I need to add users to certain groups with a script, but I need to do this on a server that is not a domain controller and it is not a member of a domain. It is windows 2000 server. I tried net group *groupname* /add *username* , but I get this command can only be used on a windows 2000 domain controller. Anyone have any suggestions? Thanks in advance.

  • #2
    Use net localgroup

    Net localgroup
    Adds, displays, or modifies local groups.

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

    net localgroup groupname {/add [/comment:"text"] | /delete} [/domain]

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



    Type net localgroup without parameters to display the name of the server and the names of local groups on the computer.


    Specifies the name of the local group to add, expand, or delete. Supply only a groupname to view a list of users or global groups in a local group.


    Adds a comment for a new or existing group. The comment can have as many as 48 characters. Enclose the text in quotation marks.


    Performs the operation on the primary domain controller of the current domain. Otherwise, the operation is performed on the local computer.

    This parameter applies only to Windows 2000 Professional computers that are members of a Windows 2000 Server domain. By default, Windows 2000 Server computers perform operations on the primary domain controller.

    name [ ...]

    Lists one or more user names or group names to add or remove from a local group. Separate multiple entries with a space. Names may be local users, users on other domains, or global groups, but not other local groups. If a user is from another domain, preface the user name with the domain name (for example, SALES\RALPHR).


    Adds a global group name or user name to a local group. An account must first be established for users or global groups before it is added to a local group with this command.


    Removes a group name or user name from a local group.


    • #3
      Thanks so much that was exactly what I was looking for.