LG Usage

lg /?

LG V01.02.00cpp Joe Richards (joe@joeware.net) July 2006

Usage:
 LG Group SecPrin [switches]

   Group         LocalGroup to work with
   Group can be specified in the following ways:
          o domain\localgroup
          o \\server\localgroup
          o localgroup

          If Group is specified as domain\. or \\server\.
          localgroups at that location are enumerated
          If Group is specified as . the localgroups on
          the local machine are enumerated


  SecPrin        Security Principal to add/remove from group

  Switches: (designated by - or /)
   -add          Add SecPrin to Group.
   -remove       Remove SecPrin from Group
   -cleargroup   Remove all members from group
   -addgroup     Add localgroup specified
   -removegroup  Remove localgroup specified
   -sid          Security principal(s) are specified as SIDs
   -r computer   Specify computer to resolve SIDs. [LOCALHOST]
   -comment      Display LG Comments
   -setcomment   Set Comment for addgroup
   -lu           List Users (only used for . enumerate option)

  Ex1:
    lg domain\.
      Enumerate localgroups on domain

  Ex2:
    lg domain\. -lu
      Enumerate all localgroups and members on domain

  Ex3:
    lg \\computer\.
      Enumerate localgroups on computer

  Ex4:
    lg . -comment
      Enumerate localgroups and comments on localhost

  Ex5:
    lg users
      Enumerates members of localgroup users on localhost

  Ex6:
    lg \\computer\bob -addgroup -setcomment "bobs group"
      Create bob localgroup on computer with comment

  Ex7:
    lg bob -setcomment "bobs group"
      Sets comment for localgroup bob on localhost

  Ex8:
    lg users joe doug louise /add
      Adds joe, doug, and louise to localgroup joe

  Ex9:
    lg \comp1users louise -add -r comp3
      Adds SID resolved at comp3 for louise to localgroup joe on comp1


 This software is Freeware. Use it as you wish at your own risk.
 If you have improvement ideas, bugs, or just wish to say Hi, I
 receive email 24x7 and read it in a semi-regular timeframe.
 You can usually find me at joe@joeware.net