Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

Net localgroup Help

  • Filter
  • Time
  • Show
Clear All
new posts

  • Net localgroup Help

    I am wanting to put my Domain Users in my Power Users Group via a batch file.

    Net localgroup power users publicsafety\ domain users /add

    When I run the script it says it cant find the local group. Is it because the name is split? How can I do this in a batch file.

    Thanks in advance for the help !

  • #2
    Re: Net localgroup Help

    Because the names have embedded spaces you should wrap them with quotes.
    Net localgroup "power users" "publicsafety\domain users" /add
    You can, as a member of the local group Administrators, run this batch on your computer.

    ! Notes...
    If you want to perform this on several computer, then you should run the script as a Computer Startup stript.

    Be Warned though! a user that belongs to the Power Users group can easily elevate themselves to fully-privileged administrators! that is one of the reasons why Power Users are gone in Vista and newer Windows Operating sytems.

    Adding and deleting members in local groups:
    • Instead of nesting the group 'Domain Users' directly into the local group 'Power Users', I would recommend to create a new security global group in AD for that pupose to where you can add domain users, then use that new group to nest into the local group Power Users.
    • note, the current name (or the localized name of the local groups) does not always have to be 'Power Users' or 'Administrators'!
      For the 'Net localgroup' command you should use the current name of the group on that computer.
    • Also, enhance your batch so it will also be able to delete unwanted members of the local group Administrators (minimal the Administrator account and the Domain Admins group should be a member of the group Administrators).
    • It is much better to use the 'Restricted Groups' policy to controll the members of local groups, instead of using startup scripts.

    Last edited by Rems; 28th April 2009, 10:50.

    This posting is provided "AS IS" with no warranties, and confers no rights.


    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts


    • #3
      Re: Net localgroup Help

      Thanks it worked. I will check into restricted groups.