Solved

Powershell Exchange Group check - How could i change to all groups begins with E*

Posted on 2013-06-04
3
418 Views
Last Modified: 2013-06-04
hi,

how could i change the code below that all groups begins with "E" will be check.
I tried with "E*" but not working.

 $GROUP = (Get-ADUser -identity $user.userid -Properties *).MemberOf | % { ($_ -split ",")[0] } | Where { $_ -eq "CN=E*" }

Open in new window


thanks
0
Comment
Question by:Mandy_
3 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 39221171
change it to:
| Where { $_ -like "CN=E*" }

Open in new window

0
 
LVL 40

Expert Comment

by:Subsun
ID: 39221172
Try with -like..
 $GROUP = (Get-ADUser -identity $user.userid -Properties *).MemberOf | % { ($_ -split ",")[0] } | Where { $_ -like "CN=E*" }

Open in new window

0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 39221199
Get-DistributionGroupMember | Where {$_.Name -Like "E*"}

- Rancy
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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