how to resolve group trustee in GPMC scripts?
hi,
i playing gpmc scripts. when gpos, can know list of trustees each gpo related (read, apply, etc.)
sometimes, trustee computer or user. sometimes, group of users/machines. how can resolve group know list of users/machines in group? also, possible list users , machines within ou/domain?
thanks lot!
-simon
i playing gpmc scripts. when gpos, can know list of trustees each gpo related (read, apply, etc.)
sometimes, trustee computer or user. sometimes, group of users/machines. how can resolve group know list of users/machines in group? also, possible list users , machines within ou/domain?
thanks lot!
-simon
hi,
you can use following script list member of group.
on error resume next
set objgroup = getobject _
("ldap://cn=scientists,ou=r&d,dc=na,dc=fabrikam,dc=com")
objgroup.getinfo
arrmemberof = objgroup.getex("member")
wscript.echo "members:"
for each strmember in arrmemberof
wscript.echo strmember
next
note: replace "cn=scientists,ou=r&d,dc=na,dc=fabrikam,dc=com" group’s dn.
for more script sample of ad groups, please refer following websitse.
http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/default.mspx?mfr=true
script repository: active directory
http://www.microsoft.com/technet/scriptcenter/scripts/ad/users/default.mspx?mfr=true
thanks.
this posting provided "as is" no warranties, , confers no rights.
you can use following script list member of group.
on error resume next
set objgroup = getobject _
("ldap://cn=scientists,ou=r&d,dc=na,dc=fabrikam,dc=com")
objgroup.getinfo
arrmemberof = objgroup.getex("member")
wscript.echo "members:"
for each strmember in arrmemberof
wscript.echo strmember
next
note: replace "cn=scientists,ou=r&d,dc=na,dc=fabrikam,dc=com" group’s dn.
for more script sample of ad groups, please refer following websitse.
http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/default.mspx?mfr=true
script repository: active directory
http://www.microsoft.com/technet/scriptcenter/scripts/ad/users/default.mspx?mfr=true
thanks.
this posting provided "as is" no warranties, , confers no rights.
Windows Server > Group Policy
Comments
Post a Comment