Get Local Group Members


i've read numerous ideas , suggestions gathering local group members, each fall short of goal. i need enumerate the local administrators group of every member server in forest , enumerate nested groups well. here's list of requirements script need. hope can help.

1. query forest list of domains.  query each domain list of member servers. no desktops, no dcs.
2. foreach member server - enumerate members of local administrators group.
3. foreach member - output domain , username
4. if member ad group, enumerate it's members.  if there's nested group within group enumerate etc.

we may have nested groups 2 levels deep. for example: domaina global group may nested domainb domain local group nested server's local administrators group.  output this.

<servername> administrators:
  domain admins
    admin1
    admin2
  domain\group1
    domain\user1
    domain\user2
    domain\group2
      domain\user3

or, user3 example give path
<server>administrators,domain\group1,domain\group2,domain\user3



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Round Robin is killing performance on our network

WMI Repository 4GB limit - Win 2003 Ent Question

Change home folder default permission?