Archive

Archive for the ‘Exchange’ Category

[EXO] Inbox Rule Issues Post Migration

September 18, 2020 No comments

In some instances, users with client side rules may  break as they do not get touched in the migration. For any client rules that reference a specific sender/folder/etc they will normally use X500/LegacyDN to identify conditions and will stop working.

  • There is no set limit for the amount of Inbox rules a user can have.
  • The amount of rules is dictated more ever by the rule size limit and limited to 256 KB total for all rules.

Each rule you create will take up space. The actual amount of space a rule uses depends on several factors, such as how long the name is and how many conditions you’ve applied. When you reach the 256 KB limit, you’ll be warned that you can’t create any more rules or that you can’t update a rule. You can’t increase the amount of space that’s allocated to store Inbox rules in Exchange Online, but you can decrease it to suit your business needs.

  • There is no way to calculate the size for all rules (avg around 3kb for a basic rule)

https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/outlook-on-the-web/increase-the-space-used-by-inbox-rules)

Options:

  • Recreate their rules entirely. Allows user to reorganize and customize their inboxes to their preference.
  • Audit, review, and consolidate rules by exporting using below cmdlet:

 

Categories: Exchange, Office365 Tags:

[EXO] Identifying Validation Errors

July 27, 2020 No comments

$errors = (Get-MsolContact –ObjectID <Object_ID>).Errors
$errors | foreach-object {“nService: " + $_.ErrorDetail.Name.split("/")[0]; "Error Message: "+ $_.ErrorDetail.ObjectErrors.ErrorRecord.ErrorDescription}

$errors = (Get-MsolGroup –ObjectID <Object_ID>).Errors
$errors | foreach-object {"
nService: ” + $_.ErrorDetail.Name.split(“/”)[0]; “Error Message: “+ $_.ErrorDetail.ObjectErrors.ErrorRecord.ErrorDescription}

$errors = (Get-MsolUser -UserPrincipalName “<User_ID>”).Errors
$errors | foreach-object {“`nService: ” + $_.ErrorDetail.Name.split(“/”)[0]; “Error Message: ” + $_.ErrorDetail.ObjectErrors.ErrorRecord.ErrorDescription}

Get-MsolUser -HasErrorsOnly -All | ft DisplayName,UserPrincipalName,@{Name=”Error”;Expression={($_.errors[0].ErrorDetail.objecterrors.errorrecord.ErrorDescription)}} -AutoSize -wrap

https://support.microsoft.com/en-au/help/2741233/you-see-validation-errors-for-users-in-the-office-365-portal-or-in-the

 

 

Categories: Exchange, Office365, Powershell Tags:

[EX2010] Identifying Cmd-let associated with Role, and who has it.

June 2, 2020 No comments

$Perms = Get-ManagementRole -Cmdlet remove-remotemailbox
$Perms | Foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}

Role RoleAssigneeType RoleAssigneeName
—- —————- —————-
Mail Recipient Creation RoleGroup Recipient Management
Mail Recipient Creation RoleGroup Organization Management

Get-ManagementRoleAssignment -Role “Mail Recipient Creation”
get-rolegroupmember “organization management”

Categories: Exchange Tags:

[EXO] The client and server cannot communicate, because they do not possess a common algorithm

  • Windows Server 2008 can’t do beyond TLS 1.0.
  • Newer versions can, but don’t have TLS 1.1 or 1.2 turned on by default.
  • Best pratice to disable 1.0, 1.1 – mostly depreciated and not supported

Check supported protocols:

https://www.ssllabs.com/ssltest/index.html

Turn off TLS 1.0.1.1 and SSL

Enabling TLS 1.2 Use

 

Categories: Exchange, Office365 Tags:

[EXO][EX2010] Removing dual mailboxes

March 2, 2020 No comments

Ensure you have a user mailbox backup prior to starting the following process as there is potential risk of data loss.  Options are to have a third party solution to perform a mailbox backup or export to PST (see new-mailboxexport cmdlet).

  1. Capture relevant information from on-premise exchange and exchange online.
    • Grab the mailbox information (primary and archive) to help determine which mailbox is active and which one to disable (remove)
      • get-mailboxstatistics <user>
      • get-mailboxstatistics <user> -archive
      • get-exomailboxstatistics (exo ps v2)
    • Grab the x500 address (legacydn)
    • Grab GUID information
      • get-recipient <user> | fl *guid*
  2. Determine which mailbox is active and which one to disable (remove) – 
    1. Removing the on-premise mailbox will require you to delete and recreate the remote mailbox – an object on-premise will need to represent the object on exchange for remote routing.
      1. Disable the on-premise mailbox – do not remove, or you will remove the AD user object:
        • disable-mailbox <user>
      2. If litigation hold is enabled, you will need to disable the hold, then disable the mailbox.
      3. Recreate the remote mailbox on-premise
        • Enable-RemoteMailbox -Identity <user> -RemoteRoutingAddress “<user>@<tenant>.mail.onmicrosoft.com”
      4. Associate the GUID and x500 for sync and mail routing:
        • Set-RemoteMailbox -exchangeguid <exchange guid> -archiveguid <archive guid>  -EmailAddresses X500: <x500>
    2. Removing the cloud mailbox
      1. Remove the user from Office 365 and resync with AD sync.
        • remove-msoluser <user>
        • remove-msoluser <user> -removefromrecyclebin -force
      2. Clearing the previous mailbox information
        • Set-User <user> -PermanentlyClearPreviousMailboxInfo

Accidentally deleted a on-premise mailbox?

  1. Identify where the disconnected or soft deleted mailbox is. 
    • $dbs = Get-MailboxDatabase $dbs | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {$_.DisconnectReason -eq “Disabled”} | Format-Table DisplayName,Database,DisconnectDate
  2. Reconnect the mailbox
    1. Connect-Mailbox -Identity “<identity>” -Database <database> -User “<user>” -Alias <alias>

Accidentally deleted the on-premise user, but need to restore the data to cloud mailbox?

  1. Create a new temporary mailbox on-premise to restore the data to.
  2. Identify where the disconnected or soft deleted mailbox is. 
    • $dbs = Get-MailboxDatabase $dbs | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {$_.DisconnectReason -eq “Disabled”} | Format-Table DisplayName,Database,DisconnectDate,*guid*
  3. Restore the primary and archive data to the temporary mailbox
    • New-MailboxRestoreRequest -SourceStoreMailbox <mailbox guid> -SourceDatabase <database> -TargetMailbox <mailbox> -AllowLegacyDNMismatch
    • New-MailboxRestoreRequest -SourceStoreMailbox<mailbox guid> -SourceDatabase <database> -TargetMailbox <mailbox> -TargetIsArchive
  4. Export the data to PST (requires rights) 
    • NewManagementRoleAssignmentRole “Mailbox Import Export”User Administrator
    • New-MailboxExportRequest -Mailbox <mailbox> -FilePath <path>
    • New-MailboxExportRequest -Mailbox <mailbox> -FilePath <path> -isarchive
      • Ensure the Exchange Trust Subsystem group has read/write permissions to path
  5. Check status:
    • GetMailboxExportRequest | where {$_.status eq “Completed”}
  6. Remove job:
    • Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest
    • Get-MailboxRestoreRequest -Status Failed | Remove-MailboxRestoreRequest
  7. Import to mailbox:
    • In Outlook with Exchange Online Mailbox, you can import directly – ensure you do not copy duplicates.
Categories: Exchange, Office365, Powershell Tags:

[EX2010][EXO] Forwarding Address Export and Import

February 11, 2020 No comments

 

Categories: Exchange, Office365, Powershell Tags:

Single mailbox export to PST file

January 22, 2020 No comments

Add member of a role group which has the Mailbox Import Export role

Export primary mailbox:

 

Export archive mailbox:

 

More details

https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/New-MailboxExportRequest?redirectedfrom=MSDN&view=exchange-ps

Categories: Exchange, Powershell Tags:

[PS][EX2010] E-mails Recieved per day of Month Report

October 9, 2019 No comments

.Synopsis
E-mail Counting Script v1 by ELAU 10/10/19
– Script counts emails received for each day of the current month
.DESCRIPTION
– Script pulls days of the month and counts number of emails received for each day of the current month or days specified into a HTML report.
– Script allows option to e-mail report
.EXAMPLE
– Run count.ps1 without parameters will prompt for required options
.EXAMPLE
– Specify days to go back without sending email report

count.ps1 -mailbox <mailbox to search> -day <days to search back from today>

.EXAMPLE
– Specify days to go back with sending email report

count.ps1 -mailbox <mailbox to search> -day <days to search back from today> -emailto <report to send to>

 

Categories: Exchange, Powershell Tags:

[PS] [EX2010] Recoverable Folder Size Report

Recoverable Folder Size Report v1

  • Crawls all mailboxes and pulls the recoverableitemsquota size
  • Displays top 10 in HTML report
  • Full CSV report is generated
  • E-mails report with full report

 

Categories: Exchange, Powershell Tags:

[EXCH] Event ID: 9646 User exceeded the maximum of 500 objects of type “objtFolder”.

September 10, 2019 No comments

Shared mailboxes setup in cache mode will download entire content of the mailbox and will register every folder in each cached mailbox toward the objtFolder type limit on the server that’s running Exchange Server. By default, objtFolder limit is set to 500 per-mailbox limit.  Once the limit is exhausted, user will start experiencing the symptoms below:

Symptoms:
– Inbox does not update automatically.
– Folder status bar shows “This folder was last updated on …” instead of “All folders are up to date” message displayed.
– Viewing items in secondary mailbox, new folders and items may not appear or seem to be missing.
– Deleted items still appear in the secondary mailbox like shadow items.
– Degraded performance or random hangs.

Exchange Server (Application log) – Error shows:
Event ID: 9646
Type: Error
Source: MSExchangeIS
Description:
Mapi session “/o=First Organization/ou=Administrative Group/cn=Recipients/cn=user”
exceeded the maximum of 500 objects of type “objtFolder”.

Solution 1: Disable Automap and seperate OST for caching (Preferred method)

1. Remove mailbox permissions
Remove-MailboxPermission -Identity <Mailbox ID1> -User <Mailbox ID2> -AccessRights FullAccess
2. Readd shared mailbox permissions without Automatpping
Add-MailboxPermission -Iden
tity <Mailbox ID1> -User <Mailbox ID2>-AccessRights FullAccess -AutoMapping:$false
3. Readd Mailbox from Mail item in Control Panel.
4.Select your profile, and then click Properties.
5.Click E-mail Accounts.
6.On the E-mail tab of the Account Settings dialog box, click New.
7.In the Choose Service section of the Add New Account dialog box, click E-mail Account, and then click Next.
8. Fill in the e-mail with the shard mailbox
9.Click Finish, click Close, click Close, and then click OK.
10.Start Outlook.

Solution 2: Disable caching of all shared folders (placing shared mailbox in Online Mode)

1.On the File tab, click Account Settings in the Account Settings list.
2.In the Account Settings dialog box, click the E-mail tab and then double-click your Microsoft Exchange Server account.
3.In the Change Account dialog box, click More Settings.
4.In the Microsoft Exchange dialog box, click the Advanced tab.
5.Click to clear the Download shared folders check box.
6.Click OK two times.
7.Click Next, click Finish, and then click Close.
8.Restart Outlook.

Solution 3: Increase the objtFolder count using Registry Key

. Open Registry Editor and navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSExchangeIS
2. Right click ParametersSystem and create New -> Key
3. Enter MaxObjsPerMapiSession and confirm creation of the new sub-key
4. Right click newly created key, create new DWORD value called objtFolder and give it a decimal value bigger than default 500.
5. Create another DWORD value called objtFolderView and give it the same value.

References:

  • https://support.microsoft.com/en-us/help/3115602/performance-and-synchronization-problems-when-you-work-with-folders-in
  • https://support.microsoft.com/en-us/help/2646504/how-to-remove-automapping-for-a-shared-mailbox-in-office-365
  • https://exutils.blogspot.com/2011/06/exceeded-maximum-of-750-objects-of-type.html
Categories: Exchange Tags: