Exchange 2010 – List Users/Mailboxes That Have Forwarding or Forwarding Rules

Trying to trace how a message came into a users mailbox can be a pain, when it is auto-forwarded via a rule in OWA, to a mailbox that has forwarding enabled, to another mailbox that is redirecting all messages. The easiest way to track this down is to query for which mailboxes and users are forwarding what to where:

Get list of users who have forwarding enabled on their accounts:
Get-Mailbox -Filter { ForwardingAddress -like “*” } | Where-Object { $_.ForwardingAddress -like “*” } | Select-Object Name,ForwardingAddress


Get list of users who have forwarding rules configured in their mailboxes:
ForEach ($m in (Get-Mailbox -ResultSize Unlimited)) { Get-InboxRule -Mailbox $m.DistinguishedName | where { $_.ForwardTo } | fl MailboxOwnerID,Name,ForwardTo }

Get list of users who have redirects configured on their mailboxes:
ForEach ($m in (Get-Mailbox -ResultSize Unlimited)) { Get-InboxRule -Mailbox $m.DistinguishedName | where {$_.ReDirectTo} | fl MailboxOwnerID,Name,RedirectTo }

Enable Disk Cleanup Windows 2008/R2

By default (for some reason) the Disk Cleanup Utility is disabled by default in Server 2008/R2. To enable the features through the wizards in Programs/Features takes forever and takes a reboot. There are two files you need that can be copy/pasted to their directories, and you’re off and running:





C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe %systemroot%\System32
C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui %systemroot%\System32\en-US

2008 (64bit)

C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_b9f50b71510436f2\cleanmgr.exe.mui %systemroot%\System32
C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_c962d1e515e94269\cleanmgr.exe.mui %systemroot%\System32\en-US

2008 (32bit)

C:\Windows\winsxs\x86_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_6d4436615d8bd133\cleanmgr.exe %systemroot%\System32
C:\Windows\winsxs\x86_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_5dd66fed98a6c5bc\cleanmgr.exe.mui %systemroot%\System32\en-US


The Cleanmgr.exe files go in %systemroot%\System32. The Cleanmgr.exe.mui files should go in %systemroot%\System32\en-US.

Reclaim some free space, grab a beer.

Clear Offline Files Cache In Windows 7

Windows 7 is great, and overall, the Offline Files work much better than in XP, but they removed the easy ability to clear/reinitialize the Offline File cache with a simple “Ctrl+Shift + Delete Files”. It is now more a bit more involved.

I just finished migrating a customer to a new server that had people’s My Documents redirected to it, and even though on the user’s workstations, the path was updated correctly to the new server’s share, when I drilled down into the users Sync Center settings to see what was in the cache, the old server was there, unable to be deleted, essentially greyed out and orphaned. Doing the following although, somewhat of a pain, worked for me:

1) Click Start > Run

2) Enter the following and click OK:

REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v FormatDatabase /t REG_DWORD /d 1 /f

3) Reboot the PC

4) Log in, locate the folder that should be available offline, right-click, ‘Make Available Offline’

5) Grab a beer.