Solved

Exchange 2007

Posted on 2011-09-09
6
325 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
Comment Utility
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
Comment Utility
is there a simple one? ;))
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
What do you mean? Thiswill give you what you want
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 500 total points
Comment Utility
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
Comment Utility
is there a no command ? why script ?
0
 
LVL 49

Assisted Solution

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
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.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
how to add IIS SMTP to handle application/Scanner relays into office 365.

771 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

12 Experts available now in Live!

Get 1:1 Help Now