Hi,
I am fairly new to PowerShell and the Quest ARS cmdlets. I have been tasked with pulling a list of DLs which contain 100 or more members and which do not currently have the dLMemSubmitPerms attribute populated. I must then add a specific DL to the 'dLMemSubmitPerms' attribute to prevent external (non-Exchange) users from being able to use the DLs in question. To find the list of target DLs I am using the following Get-QADGroup code:
$grps=Get-QADGroup -GroupType Distribution -SizeLimit 0 -DontUseDefaultIncludedProperties -IncludedProperties AllMembers,DN,dLMemSubmitPerms,Email -searchRoot "myco.com/FIM Distribution Groups" -SearchScope "SubTree" -LdapFilter '(&(objectCategory=group)(!dLMemSubmitPerms=*))' -ShowProgress -ErrorAction SilentlyContinue | Where-Object {$_.AllMembers.Count -ge 100} | Select DN,Email | Out-Null
It takes a very long time to process (which is understandable), especially when using AllMembers rather than just Members. I just wanted to see if there is a better or more efficient method of getting this data.... The script will run daily or weekly.
Many thanks,
Stu
PS> We cannot use the msExchRequireAuthToSendTo attribute (although that would be a lot easier) due to the way in which Microsoft has implement our Exchange 2010 Office-365D environment (all external mail that comes from our internal SMTP mail relays into the Office-365D environment and is therefor is set as authenticated). Thus Microsoft recommended using the above approach instead.