Solved

Exchange 2007

Posted on 2011-09-09
6
360 Views
Last Modified: 2012-05-12
I have a task to find out all exchange users groups. can i find out on the shell with command that who is in which group?
0
Comment
Question by:orkinos
  • 4
  • 2
6 Comments
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 36515504
Kindly copy paste the below in a .ps1 file and run it, it will give you the list of all users and their corresponding groups

supposing you call the file GroupList.ps1 run

[PS] > ."\GroupList.ps1" > c:\list.txt

and the output will be saved in a file called list.txt
$users = Get-User -ResultSize unlimited

foreach ($user in $users)
{
   $userDN = [adsi](“LDAP://”+$user.DistinguishedName)
   $groups = $userDN.memberof
   echo `n
   $user.name
   echo "--------------------------------------------------------------------"
   foreach($group in $groups)
   {
      $strGroup = $group.split(‘,’)[0]
      $strGroup = $strGroup.split(‘=’)[1]
      $strGroup
   }
}

Open in new window

0
 

Author Comment

by:orkinos
ID: 36518219
is there a simple one? ;))
0
 
LVL 49

Expert Comment

by:Akhater
ID: 36518267
What do you mean? Thiswill give you what you want
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 500 total points
ID: 36518624
I dont understand what you dont like in my script. Anyway here are some oher options

http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/63ad55d1-1393-4533-8065-1d7cbd8657fa/
0
 

Author Comment

by:orkinos
ID: 36528674
is there a no command ? why script ?
0
 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 500 total points
ID: 36528694
because there is no one powershell command that will give you this
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

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.
A procedure for exporting installed hotfix details of remote computers using powershell
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 demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

828 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