?
Solved

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

Posted on 2013-06-04
3
Medium Priority
?
429 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:
Meir Rivkin earned 2000 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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

850 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