[Last Call] Learn how to a build a cloud-first strategyRegister Now


powershell exchange 2007 character question

Posted on 2011-10-17
Medium Priority
Last Modified: 2012-08-14
In our organization we use special characters in the display name to differentiate a shared mailbox, versus user mailboxes, versus distribution list.What I am trying to do is find user mailboxes which are incorrectly created with the wrong character.

Get-User -ResultSize Unlimited | Where {$_.RecipientType -eq "UserMailbox" -and $_.Displayname -contains '^' -and $_.Displayname -contains '|' -and $_.Displayname -contains '@'}

I was hoping to shorten this and trying to group the special characters together.
Question by:techdrive
1 Comment
LVL 16

Accepted Solution

Bryan Butler earned 2000 total points
ID: 36983359
Shortening as in speed?  Have you tried piping each result as in:

Get-User -ResultSize Unlimited | Where {$_.RecipientType -eq "UserMailbox"} | Where ($_.Displayname -contains '^') | Where ($_.Displayname -contains '|') | Where ($_.Displayname -contains '@')}

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
If you have come across a situation where you need to find some EDB mailbox recovery techniques, then here you will find the same. In this article, we will take you through three techniques using which you will be able to perform EDB recovery. You …
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
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 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