Exchange Geek's Weblog

I'm a Geek!

Archive for the ‘Exchange Server 2007’ Category

How to generate a report of full mailbox access

Posted by Milind Naphade on 14/11/2011


If you have gone through an ExRAP lately and have encountered this as an observation during operational interview you are definitely going to need this very small piece of powershell command.

$CreateStamp = Get-Date -UFormat %d_%m_%Y
Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission | Where {$_.User.ToString() -ne “NT AUTHORITY\SELF” -and $_.IsInherited -eq $false} | Select Identity,User,@{Name=’Access Rights’;Expression={[String]::Join(‘, ‘, $_.AccessRights)}} | Export-Csv -NoTypeInformation -Path “C:\temp\Full_Mailbox_Access_Report_$CreateStamp.csv”



Posted in Exchange 2010, Exchange Server 2007 | 2 Comments »

Find All Distribution Groups and their Members in Exchange Org

Posted by Milind Naphade on 25/02/2011

Get-DistributionGroup –ResultSize Unlimited | FL Identity | Out-File C:\Temp\All_DGs.txt

$AllDGs = Get-Content "D:\Temp\All_DGs.txt"
ForEach ($DG in $AllDGs)
Echo $DG >>"D:\Temp\All_DG.csv"
Get-DistributionGroupMember –Identity $DG -ResultSize Unlimited | FT Name, PrimarySMTPAddress, RecipientType >> "D:\Temp\All_DG.csv"


I know this simple script can be even better but it was written in extreme hurry so it does have some extra lines. If you feel that it could be really better then please feel free to comment with your own idea. 🙂

Posted in Exchange 2010, Exchange Server 2007 | 3 Comments »

Disabling Outlook Anywhere Per User

Posted by Milind Naphade on 05/01/2011

RPC/HTTPS was the first name when outlook anywhere access was introduced with Exchange Server 2003. Exchange 2003 did not provide a very granular control on it though. With increase in productivity it also brought a concern with it. It could allow configuring user’s mailbox on any outlook client even if the user was not supposed to do it. Result, people could make unauthorized copies of their mailboxes on their home PCs and laptops.

Exchange 2007 SP1 and later has a great feature of disabling outlook anywhere access per user basis. It is a very simple process of running few commands in powershell and the administrator is done with the configuration. Lets take a look:

To disable outlook anywhere for a single user:

Get-Mailbox –Identity <username> | Set-CASMailbox -MAPIBlockOutlookRpcHttp:$True

To disable it for all users:

Get-Mailbox –ResultSize Unlimited | Set-CASMailbox -MAPIBlockOutlookRpcHttp:$True

To disable it for selected users only:

  • Identify the user who need to be blocked access to Outlook Anywhere.
  • Make a list of all such user’s user accounts.
  • Put it in a simple text file as below:




  • Now save this text file to any location you want with name Mailboxes.txt. In my case it is D:\Mailboxes.txt
  • Simply run the script below.

$Mailboxes = Get-Content D:\Mailboxes.txt
Foreach ($Mailbox in $Mailboxes)
Set-CASMailbox -Identity $Mailbox -MAPIBlockOutlookRpcHttp:$true -Verbose

The harder way:

Each mailbox in active directory has an attribute named ProtocolSettings on it. When you have outlook anywhere enabled for a specific user mailbox the value of ProtocolSettings is set to MAPI§§§§§0§§§, HTTP§1§1§§§§§§, OWA§1 and when you disable outlook anywhere the value of this attribute changes to MAPI§§§§§1§§§, HTTP§1§1§§§§§§, OWA§1

I would not touch these attributes in AD unless there is a good reason to do so but thought it could help for some people for troubleshooting. Hope this post helps Smile

Posted in Active Directory, Exchange 2010, Exchange Server 2007 | 1 Comment »

Exchange 2007 on Windows 2008 R2 will be supported soon

Posted by Milind Naphade on 05/11/2009

Microsoft Exchange 2007 on Windows 2008 R2 support is under consideration perhaps Microsoft has already made decision to support this combination. Though there is no further information available on this yet you can read the official story here Supporting Exchange 2007 on Windows Server 2008 R2

Posted in Exchange Server 2007, News | Comments Off on Exchange 2007 on Windows 2008 R2 will be supported soon