def DumpLocalGroups():
 path = ('WinNT://%s,computer' % (local_name,))
 ob = ADsGetObject(path, IID_IADsContainer)
 ob.put_Filter(['Group'])
 for sub_ob in ob:
  print ('Group: %s (%s)' % (sub_ob.Name, sub_ob.ADsPath))
  members = sub_ob.Members()
  for member in members:
   print ('  Group member: %s (%s)' % (member.Name, member.ADsPath))

def DumpLocalGroups ( ) : path = ( 'WinNT://%s,computer' % ( local_name , ) ) ob = ADsGetObject ( path , IID_IADsContainer ) ob . put_Filter ( [ 'Group' ] ) for sub_ob in ob : print ( 'Group: %s (%s)' % ( sub_ob . Name , sub_ob . ADsPath ) ) members = sub_ob . Members ( ) for member in members : print ( '  Group member: %s (%s)' % ( member . Name , member . ADsPath ) )
dumps the local machine groups .