Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to check that a users has "Exchange View-Only Administrator role" on Exchange 2007

Posted on 2010-08-18
5
Medium Priority
?
1,157 Views
Last Modified: 2012-06-22
can anybody provide the powershell script to find out that if a user has "Exchange View-Only Administrator role" on exchange 2007. and similarly "View-Only Organization Management role" on exchange 2007.
0
Comment
Question by:vickytaurus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 42

Expert Comment

by:Adam Brown
ID: 33468412
You can use get-rolegroup to view which roles exist in your environment. Then get-rolegroupmember to see which users are a member of each group. So you should be able to use get-rolegroupmember "view-only administrator" or something like that. You'll need to do the get-rolegroup to get the actual name. I don't have 2007 on my test network so I'm sorry I can't get any more specific.
0
 
LVL 28

Accepted Solution

by:
sunnyc7 earned 1000 total points
ID: 33468616
Get-ExchangeAdministrator | fl

to check for a particular user
Get-ExchangeAdministrator | fl -Identity domain\username

get-rolegroup works for Exchange 2010 IMHO
Doesnt work on 2007
0
 
LVL 13

Assisted Solution

by:soostibi
soostibi earned 1000 total points
ID: 33474121
Try this. In the last line, where actually you call the recursive function, you can set what exchange security group you want to check.
In this form you will get all the members of the view-only administrators (both users and groups), regardless of the fact, that the object is directly added to this group or if it is a member through an embedded membership.

If you comment out the 11th row, you'll get only users, not groups.
function get-exgroup ($exgroup, $global:collect = @())
{
	$exgroup.members | ?{$collect -notcontains $_.distinguishedname} | %{
		$g = Get-Group $_ -ErrorAction SilentlyContinue
		if(!$g){Get-User $_ | Add-Member -MemberType NoteProperty -Name Type -Value "User" -PassThru
			$global:collect += $_.distinguishedname
		}
		else{
			$global:collect += $_.distinguishedname
			get-exgroup $g $collect
			$g | Add-Member -MemberType NoteProperty -Name Type -Value "Group" -PassThru
		}
	}
}

get-exgroup (Get-Group "exchange view-only administrators") | ft name, type

Open in new window

0
 

Author Comment

by:vickytaurus
ID: 33753913
Issue resolved.
0

Featured Post

Introducing the WatchGuard 420 Access Point

WatchGuard's newest access point includes an 802.11ac Wave 2 chipset, providing the fastest speeds for VoIP, video and music streaming, and large data file transfers. Additionally, enjoy the benefits of strong security as the 3rd radio delivers dedicated WIPS protection!

Question has a verified solution.

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

I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
how to add IIS SMTP to handle application/Scanner relays into office 365.
Suggested Courses

722 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