Distribution Group Management


hello,

ok... seem having issues wrapping head around one.  have 10 inoffice distribution groups want end users manage though our corporate intranet.  have a sql recordset returns username , string of groups want belong to.

i have script set loop through recordset , going have users either added or removed respective groups if needed.  here questions:

1.  how confirm user or not member of particular distributiongroup?  not return whole membership...

2.  logic here loop through 10 groups each user.. querying membership goes... seems large task 800+ users.  that's 8000 queries office 365.  not sure best approach.

i not want try adding/removing users these groups without confirming weather needed ahead of time. 

any guidance wonderful.

thanks,

ernst.

the user cmdlets don't display group info ad does, have groupmember first. 

($username -in (get-distributiongroupmember $group).name)

there isn't sense in doing though can see how long command takes. keep track of group membership in sql db , apply changes there.


dan



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file