Filter Distribution Group based on Names - Exchange


hello,

we have around 1.5lakhs distribution lists in our organization.

i need extract list of dls filtering out has "-restrict", "-delegate", "-access" @ end (for alias). want dls without these words. tried command still extracting whole list without filtering requirement. please help?

my command:

[ps] c:\>get-distributiongroup -resultsize unlimited | {($_.alias -ne "*-delegate") -and ($_.alias -ne "*-restrict")} |select distinguishedname |export-csv d:\dlinfo.csv

please help


never giveup till want.

use -notlike instead 0f -ne

ex

get-adgroup -filter *| {($_.name -notlike "*users") -and ($_.name -notlike "*admins")}




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607