Sunday, August 30, 2015

[EX2010] OoF Troubleshooting



Verify the OOF URL when AutoDiscover was successful
The protocol group to look in is as follows:

When using Outlook internally (or via VPN) with Outlook Anywhere disabled:
Protocol: Exchange RPC
When using Outlook internally (or via VPN) with Outlook Anywhere enabled:
Protocol: Exchange HTTP (first block if there are 2)
When using Outlook externally:
Protocol: Exchange HTTP (second block if there are 2)

Now log on to Outlook Web App (OWA) via your browser, type the OOF URL in the Address Bar.

If the OOF service is available at this URL, you should now get a page with XML information or a service page.
If the OOF service isn’t available at this URL, you’ll most likely get a “403 Forbidden” or “The page cannot be displayed” error.


Get-WebServicesVirtualDirectory
EWS Authentication Methods
Valid certificate


Clear OOF Rule in the mailbox: 
======================== 
1. Turn off OOF on a problem user and close Outlook 
2. Use MFCMapi tool to logon the problem user"s mailbox (by using Online Mode profile) 
3. Expand Root Container->Top of Information Store 
4. Right click Inbox folder and click Open Associated contents table 
5. Delete following messages if exist: 

a. Message class == IPM.Rule.Message 
0x65EB001E == Microsoft Exchange OOF Assistant 
0x65EC001E == Microsoft.Exchange.OOF.InternalSenders.Global 

b. Message class == IPM.Note.Rules.OofTemplate.Microsoft 

c. Message class == IPM.Rule.Message 
0x65EB001E == MSFT:TDX OOF Rules 

d. Message class == IPM.Rule.Message 
0x65EB001E == Microsoft Exchange OOF Assistant 
0x65EC001E == Microsoft.Exchange.OOF. AllExternalSenders.Global 

e. Message class == IPM.Note.Rules.ExternalOOFTemplate.Microsoft 

f. Message class == IPM.ExtendedRule.Message 
0x65EB001E == Microsoft Exchange OOF Assistant 
0x65EC001E == Microsoft.Exchange.OOF.KnownExternalSenders.Global 

6. After that, please start Outlook and configure OOF for the user. Please check whether the issue persists. 

How to clean Out of Office Rules using MFCMAPI


How to Remove an Invisible or Corrupted "Out of Facility" message with MFCMAPI



[EX2010] Search-Mailbox



The Search-Mailbox cmdlet returns up to 10000 results per mailbox if a search query is specified. To return more than 10000 results, use the New-MailboxSearch cmdlet or the In-Place eDiscovery & Hold console in the Exchange Administration Center. 



[EX2010] MRSProxy Service Configuration



C:\Program Files\Exchange Server\V14\Client Access\exchweb\ews\web.config

In the bottom of this file, you needed to change IsEnabled=”false” to IsEnabled=”true” then save the file and restart the Exchange MRS service.

Set-WebServicesVirtualDirectory -Identity “EWS (Default Web Site)” -MRSProxyEnabled $true –MRSProxyMaxConnections 100



[EX2010] EAS: 8MB attachment



Event ID 1008: "Maximum Request Length Exceeded"


This is due to the Max Request Length setting being 10MB by default.  So any message with an attachment that is around 8MB or so will fail to send as the request is too big.  The reason I say 8MB is that we have to take into consideration the 33% MIME conversion bloat added to the message after MIME conversion.  Once that 33% is taken into account, we will exceed the 10MB Max Request Length limitation.  The iPhone will continue to try and send the message until it is removed from the device. 

To resolve this issue with iOS devices, we typically recommend increasing the Maximum Request Length parameter on the web.config file for ActiveSync on the Client Access Server(s).   
  • On the CAS servers, browse to the web.config file (under the ClientAccess\Sync folder)
  • Open the web.config file
  • Modify the <httpRuntime maxRequestLength=”10240″/> parameter to a higher value to something higher, such as 15360 (15MB).
  • Save the updated web.config file
  • Restart IIS (IISRESET)
That's it.  Naturally if a larger value is needed then just follow the same steps to increase the value that is required.  We don't recommend getting too carried away with this setting.  Common recommendations are 15-20MB... and usually no higher than 50MB.



[EX2010] Upgrade Order



You should upgrade your Exchange 2010 server roles in the following order:
  • Client Access
  • Hub Transport
  • Unified Messaging
  • Mailbox
  • Edge Transport


 Upgrade your Exchange 2013 server roles in the required order. First, upgrade Mailbox servers and then upgrade Client Access servers.


Therefore, it is important to upgrade your Client Access servers prior to upgrading your Mailbox servers if you have multiple OAB generation mailboxes deployed in your environment.



[EX2010] Collect Exchange version of all servers



$installpath = "c$\Program Files\Microsoft\Exchange Server\V14\Bin\ExSetup.exe"
Get-ExchangeServer  | ?{$_.admindisplayversion -like  "*14*"} | %{
$Servername = $_.Name
$role = $_.serverrole
$Path = "\\" + $Servername + "\" + $installpath
$fileversion = (Get-Command $Path).FileVersionInfo |ForEach {$_.FileVersion}
$result = $Servername + "|" +  $fileversion + "|" + $role
$result
$result >> result.txt
}

[EX2010] RBAC - Helpdesk





Get-ManagementRole "Distribution Groups" | New-ManagementRole "Distribution Groups No Delete"
Get-ManagementRole "Mail Recipient Creation" | New-ManagementRole "Mail Recipient Creation No Delete"
Get-ManagementRole "Mail Recipients" | New-ManagementRole "Mail Recipients No Delete"

Get-ManagementRole "Distribution Groups No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-DistributionGroup"} | Remove-ManagementRoleEntry
Get-ManagementRole "Distribution Groups No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-DynamicDistributionGroup"} | Remove-ManagementRoleEntry


Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-MailContact"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-Mailbox"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-MailUser"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-RemoteMailbox"} | Remove-ManagementRoleEntry


Get-ManagementRole "Mail Recipients No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Add-MailboxPermission"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipients No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-MailboxPermission"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipients No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Get-MailboxPermission"} | Remove-ManagementRoleEntry

New-RoleGroup "HD" -Roles "Distribution Groups No Delete", "Mail Recipient Creation No Delete", "Mail Recipients No Delete" -Members jen

New-ManagementScope "Executive Users Exclusive Scope" -RecipientRestrictionFilter { department -eq "Manager" } -Exclusive

New-ManagementRoleAssignment -Name "Managers" -SecurityGroup "Organization Management" -Role "Mail Recipients" -ExclusiveRecipientWriteScope "Executive Users Exclusive Scope"



-----------------------------

Get-ManagementRole "Distribution Groups" | New-ManagementRole "Distribution Groups No Delete"
Get-ManagementRole "Mail Recipient Creation" | New-ManagementRole "Mail Recipient Creation No Delete"
Get-ManagementRole "Mail Recipients" | New-ManagementRole "Mail Recipients No Delete"

Get-ManagementRole "Distribution Groups No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-DistributionGroup"} | Remove-ManagementRoleEntry
Get-ManagementRole "Distribution Groups No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-DynamicDistributionGroup"} | Remove-ManagementRoleEntry


Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-MailContact"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-Mailbox"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-MailUser"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipient Creation No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-RemoteMailbox"} | Remove-ManagementRoleEntry


Get-ManagementRole "Mail Recipients No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Add-MailboxPermission"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipients No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Remove-MailboxPermission"} | Remove-ManagementRoleEntry
Get-ManagementRole "Mail Recipients No Delete" | Get-ManagementRoleEntry | Where {$_.Name -like "Get-MailboxPermission"} | Remove-ManagementRoleEntry

New-RoleGroup "HD" -Roles "Distribution Groups No Delete", "Mail Recipient Creation No Delete", "Mail Recipients No Delete" -Members jen

New-ManagementScope "Executive users exclusive scope" -Recipientrestrictionfilter { department -eq "manager" } -exclusive

New-managementroleassignment -name "managers" -securitygroup "Organization Management" -role "mail recipients" -exclusiverecipientwritescope "executive users exclusive scope"


Get-RoleGroup -Identity "organization*"
Get-RoleGroup -Identity "organization*" | fl
Get-RoleGroup -Identity "organization*" | Get-ManagementRole
Get-RoleGroup -Identity "organization*" | Get-ManagementRoleAssignment
Get-RoleGroup -Identity "organization*" | Get-ManagementRoleEntry
Get-ManagementRole
Get-RoleGroup -Identity "organization*" | fl -autosize
Get-RoleGroup -Identity "organization*" | ft -autosize
Get-RoleGroup -Identity "organization*" | ft -wrap
Get-RoleGroup -Identity "organization*" | Out-GridView
Get-RoleGroup -Identity "organization*" | fl | Out-GridView
Get-RoleGroup -Identity "organization*" | fl
Get-RoleGroup -Identity "organization*" | fl Roles
Get-RoleGroup -Identity "organization*" | fl RolesSelect-Object -ExpandProperty
Get-RoleGroup -Identity "organization*" | fl Roles Select-Object -ExpandProperty
Get-RoleGroup -Identity "organization*" | fl Select-Object -ExpandProperty
Get-RoleGroup -Identity "organization*" | fl Select-Object Roles -ExpandProperty
Get-RoleGroup -Identity "organization*" | fl Select-Object Roles
Get-RoleGroup -Identity "organization*" | Select-Object Roles -ExpandProperty
Get-RoleGroup -Identity "organization*" | Select-Object -ExpandProperty
Get-RoleGroup -Identity "organization*" | Select-Object -ExpandProperty Roles
Get-RoleGroup -Identity "organization*" | Select-Object -ExpandProperty Roles | ft name
Get-RoleGroup -Identity "organization*" | Select-Object -ExpandProperty Roles | fl name
Get-RoleGroup -Identity "organization*" | Select-Object -ExpandProperty Roles | ft name
Get-RoleGroup -Identity "organization management" | Select-Object -ExpandProperty Roles | ft name
Get-RoleGroup -Identity "organization management" | Select-Object -ExpandProperty Roles
$g = Get-RoleGroup -Identity "organization management" | Select-Object -ExpandProperty Roles
($g).get(0)
New-ManagementRoleAssignment -SecurityGroup ALI -Role $g -ExclusiveRecipientWriteScope "executive users exclusive scope"
$g | New-ManagementRoleAssignment -SecurityGroup ALI -ExclusiveRecipientWriteScope "executive users exclusive scope"
Get-RoleGroup -Identity "organization management" | Select-Object -ExpandProperty Roles | ft name
Get-RoleGroup -Identity "ali" | Select-Object -ExpandProperty Roles | ft name
Get-ManagementScope -Exclusive:$true | fl
Get-ManagementRoleAssignment
Get-ManagementRoleAssignment managers

Get-ManagementRoleAssignment managers | Remove-ManagementRoleAssignment