def GroupEnum():
 nmembers = 0
 resume = 0
 while 1:
  (data, total, resume) = win32net.NetGroupEnum(server, 1, resume)
  for group in data:
   verbose(('Found group %(name)s:%(comment)s ' % group))
   memberresume = 0
   while 1:
    (memberdata, total, memberresume) = win32net.NetGroupGetUsers(server, group['name'], 0, resume)
    for member in memberdata:
     verbose((' Member %(name)s' % member))
     nmembers = (nmembers + 1)
    if (memberresume == 0):
     break
  if (not resume):
   break
 assert nmembers, 'Couldnt find a single member in a single group!'
 print 'Enumerated all the groups'

def GroupEnum ( ) : nmembers = 0 resume = 0 while 1 : ( data , total , resume ) = win32net . NetGroupEnum ( server , 1 , resume ) for group in data : verbose ( ( 'Found group %(name)s:%(comment)s ' % group ) ) memberresume = 0 while 1 : ( memberdata , total , memberresume ) = win32net . NetGroupGetUsers ( server , group [ 'name' ] , 0 , resume ) for member in memberdata : verbose ( ( ' Member %(name)s' % member ) ) nmembers = ( nmembers + 1 ) if ( memberresume == 0 ) : break if ( not resume ) : break assert nmembers , 'Couldnt find a single member in a single group!' print 'Enumerated all the groups'
enumerates all the domain groups .