How to export all mailboxes to PST file on Exchange.

Hi this is my easy way to export all mailboxes to PST on the Exchange servers.

Step1: We have to give our user permission to EXPORT mailboxes.

New-ManagementRoleAssignment -role "Mailbox Import Export" -User OUR_USER

Step2: Please create folder where you want to save PST files.

Step3: Export user names.

Get-mailbox| Select-Object -ExpandProperty Name | Out-File -FilePath "c:\user_list.txt"

Step4: Run script bellow. Please remember to change path where you want save PST files. Very important it has to be UNC path.
foreach ($user in $content)
{
New-MailboxExportRequest -Mailbox $user -FilePath "\\MY-Server\PST\$user Mailbox.pst"
}

How to disable Exchange cached mode in Outlook on the Terminal Server.

Hi,

Today I will show you how to disable Exchange Cached Mode in Outlook on Terminal Server. Unfortunately we can’t do it using GPO because “Use Cached Exchange Mode for new and existing Outlook profile” only exists in the User tree.

Open regedit

Go to: HKLM – > Software -> Policies -> Microsoft -> Office -> 15.0 -> Outlook -> OST and create dword NoOST -> give value 2.

HKEY_LOCAL_MACHINE/SOFTWARE/Policies/Microsoft/Office/14.0/Outlook/OST

For outlook 2010 change 15.0 to 14.0.

Disable OST on Terminal Server

How to remove PUBLIC FODER using ADSIEdit

Most of our clients are moving to Office 365. I found out that sometimes is really difficult to remove Public Folders.

This is easy way to solve it is use ADSI-Edit.

Exchange 2010

  1. Open ADSI-Edit and got to configuration
  2. Navigate to this path:
  3. CN=Configuration,DC=DOMAIN,DC=LOCAL
  4. CN=Services
  5. CN=Microsoft Exchange
  6. CN=EXCHANGE_ORG
  7. CN=Administrative Groups
  8. CN=Exchange Administrative Group (FYDIBOHF23SPDLT)
  9. CN=Databases
  10. CN=PUBLIC_FOLDER_DATABASE
  11. Now you can delete the PF-Database you want to get rid off.

Exchange 2007

  1. Open ADSI-Edit and got to configuration
  2. Navigate to this path:
  3. CN=Configuration,DC=DOMAIN,DC=LOCAL
  4. CN=Services
  5. CN=Microsoft Exchange
  6. CN=EXCHANGE_ORG
  7. CN=Administrative Groups
  8. CN=Exchange Administrative Group (FYDIBOHF23SPDLT)
  9. CN=Servers
  10. CN=SERVERNAME
  11. CN=InformationStore
  12. CN=STORAGE_GROUP
  13. CN=PUBLIC_FOLDER_DATABASE
  14. Now you can delete the PF-Database you want to get rid off.

Exchange 2003

  1. Open ADSI-Edit and got to configuration
  2. Navigate to this path:
  3. CN=Configuration,DC=DOMAIN,DC=LOCAL
  4. CN=Services
  5. CN=Microsoft Exchange
  6. CN=EXCHANGE_ORG
  7. CN=Administrative Groups
  8. CN=First administrative Group
  9. CN=Servers
  10. CN=SERVERNAME
  11. CN=InformationStore
  12. CN=STORAGE_GROUP
  13. CN=PUBLIC_FOLDER_DATABASE

ADSIEDIT_Public_Folder_Remove

How to create report of user mailbox size for Exchange in Powershell.(DisplayName, PrimarySmtpAddress, TotallItemSize).

This is one of my favorite Powershell scripts. Easy way to show how big are Exchange mailboxes and make your boss happy 🙂

This is the result:

Exchange Users, Mialbox Report

Copy and past 🙂

$Report=@()
$mailbox=Get-mailbox –resultsize unlimited
$mailbox| foreach-object{
$DisplayName=$_.DisplayName
$SmtpAddress=$_.PrimarySmtpAddress
$TotalItemSize=(get-mailboxstatistics –identity $DisplayName ).TotalITemSize
$obj=new-object System.Object
$obj|add-member -membertype NoteProperty -name "DisplayName" -value $DisplayName
$obj|add-member -membertype NoteProperty -name "PrimarySmtpAddress" -value $SmtpAddress
$obj|add-member -membertype NoteProperty -name "TotalItemSize" -value $TotalItemSize
$Report+=$obj
}
$path_s=[Environment]::GetFolderPath("Desktop")
$Report|Sort "TotalItemSize" -Descending | export-csv $path_s\report.csv -notype