Solved

Exchange 2007

Posted on 2011-09-09
6
343 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
how to add IIS SMTP to handle application/Scanner relays into office 365.

895 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

16 Experts available now in Live!

Get 1:1 Help Now