Solved

Pull Distribution list with specific word in the DL name

Posted on 2010-11-17
8
463 Views
Last Modified: 2012-05-10
Exchange 2007 SP1 RU8

I need to pull / search all the Distribution list with a specific word say ABC in the DL name.
We have the DL name format as DL-NAM-NY-ABC Team

Looking for a powershell script to do this.
0
Comment
Question by:amku03
  • 3
  • 3
  • 2
8 Comments
 
LVL 70

Accepted Solution

by:
Chris Dent earned 400 total points
Comment Utility

Dead easy :)

Get-DistributionGroup *DL*

We can do pattern matching if you want more complex things.

Chris
0
 
LVL 70

Expert Comment

by:Chris Dent
Comment Utility

PS the command above should be run from the Exchange Management Shell, or any shell with the Exchange CmdLets loaded.

Chris
0
 

Author Comment

by:amku03
Comment Utility
Thanks, but I am aware of this.
I am looking to pull specific DLs with specific word in their names.

Like DL-NAM-NY-ABC Team1
DL-EUR-SW-ABC Team5

So I want to pull such DLS with ABC in their name...

Any suggestions??
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
get-distributiongroup | ? ($_.name -like "DL*")

0
Wish Marketing would stop bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

 
LVL 49

Expert Comment

by:Akhater
Comment Utility
Ok i should have refreshed sorry :)


DLs with ABC in the names

get-distributiongroup | ? ($_.name -like "*ABC*")
0
 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 100 total points
Comment Utility
and I got it wrong :D

get-distributiongroup | ? {$_.name -like "*ABC*"}

or simply as per Chris

get-distributiongroup *ABC*
0
 
LVL 70

Expert Comment

by:Chris Dent
Comment Utility

> I am looking to pull specific DLs with specific word in their names.

This is exactly what I gave you, what do you want beyond that?

Chris
0
 

Author Closing Comment

by:amku03
Comment Utility
thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now