O-Xchange Notes from the Field!

Wednesday, October 30, 2013

Exchange 2013 Mailbox Creation Hangs

Scenario: Mailbox creation hangs in Exchange 2013 in EAC and EMS, although the mailbox will eventually be created. When creating a mailbox in Exchange Management Shell and enabling verbose logging, the following log is displayed after it hangs:

VERBOSE: [19:50:51.165 GMT] New-Mailbox : Unable to generate the e-mail address. Unable to load address module 'C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\address\GWISE\AMD64\gwxpxgen.dll' for address type 'GWISE'. Additional message: 'The specified module could not be found'.

Resolution: There is a GWISE value still present in the Default Recipient Policy.
1. Open ADSI Edit.
2. Connect to the Configuration Naming Context of a Domain Controller or your domain.
3. Navigate to: Configuration --> CN=Services --> CN=Microsoft Exchange --> CN=<Exchange Name> --> CN=Recipient Policies
4. Right click on CN=Default Policy and select properties.
5. Locate the gatewayProxy attribute and remove the GWISE value.
Note: Other articles suggested looking at the disabledGatewayProxy as well and removing the GWISE value.

Mailbox Auditing in Exchange 2010

Scenario: You want to audit the activity in a mailbox. Auditing includes information on who does what in a mailbox.

Enable Auditing for a mailbox: Set-Mailbox -identity "Mailbox Name" -AuditEnabled $true
Search Audit Logs for a mailbox: Search-MailboxAuditLog -Identity "Mailbox Name" -showdetails
Disable Auditing for a mailbox: Set-Mailbox -identity "Mailbox Name" -AuditEnabled $false

By default, the audit logs are retained for 90 days and then purged. This can be controlled by the -AuditLogAgeLimit parameter. The logs are stored in the mailbox under the Audits Subfolder under the Recoverable Items Folder. The Recoverable Items Folder is a hidden folder.

Conditions for Log Truncation in Exchange

These are the conditions in which Exchange's Replication service will truncate the committed log files in Exchange:

Exchange 2010 & 2013
  • The log file must have been successfully backed up, or circular logging must be enabled.
  • The log file must be below the checkpoint (the minimum log file required for recovery) for the database.
  • All other lagged copies must have inspected the log file.
  • All other copies (not lagged copies) must have replayed the log file.
Exchange 2013
Exchange 2013 uses quite a big checkpoint depth (100MB), it’s usual to find a hundred or more transaction logs even when circular logging is enabled and the database is essentially quiescent. It’s far removed from the five or six transaction logs that a standalone database enabled for circular logging might use.

Wednesday, October 23, 2013

Entering Exchange Product Key in Exchange Powershell

Task: Enter in the Exchange Product Key in Exchange Powershell by using the command below.
Set-ExchangeServer servername -ProductKey aaaaa-aaaaa-aaaaa-aaaaa-aaaaa
Even though you can see the new edition on Exchange, the new edition/product key will not be fully activated until the Information Store service is restarted. The new editions functionality will not be there until the service restart. Restart it from Exchange Powershell Below.

Warning for Restarting Information Store Service after Exchange 2013 DB Creation

Scenario: A mailbox database or mailbox database replica was created on a server and you receive the following warning:
WARNING: Please restart the Microsoft Exchange Information Store service on serverservername after adding new mailbox databases. Alternatively, you can restart the server

Reason: The information store service in Exchange 2013 decides how much memory it will allocate for each database during the information store service startup. Therefore if you add databases after this is service is started, the information store does not have a predetermined amount of memory to manage the database.

Note: The database is still functional even if you do not restart the service, but restarting the serice is still recommended.
Note: In earlier versions of Exchange, the information store service tried utilizing as much memory as it could at the information store service startup.

Creating Exchange Databases and creating Database Copies in Exchange Powershell

Task: To create Exchange DB's and DB Copies, follow the following powershell commands below. Note everything with this highlight will need your adjusting.

Create the DB:
New-MailboxDatabase dbname -Server servername -LogFolderPath C:\dbfolder\Logs -EDBFilePath C:\dbfolder\DB\dbname.edb 
Mount the DB:
Mount-Database dbname 
Add the DB Copies to other DAG members:
Add-MailboxDatabaseCopy dbname -MailboxServer PassiveServerName -ActivationPreference 2 
Add-MailboxDatabaseCopy dbname -MailboxServer PassiveServerName -ActivationPreference 3 
Add-MailboxDatabaseCopy dbname -MailboxServer PassiveServerName -ActivationPreference 4 

Thursday, October 17, 2013

using Netsh

​Using Netsh:

-launch powershell as an administrator
-type netsh
-type interface ipv4
-type show interfaces (note the correct the interface name)

Add route 192.168.1.0/74  "Replication" 192.168.5.0
note that 192.168.5.0 is the next hop to get to the 192.168.1.0 network

tip: use netsh int tcp reset to reset TCP

Wednesday, October 16, 2013

Mailbox is Disabled after Reconnecting mailbox from disconnected state.

Scenario: After you reconnect a disconnected mailbox, you may receive the following error in Outlook Web App, ​ ‘Your mailbox has been disabled.’ You may also have trouble connecting to her mailbox in powershell or EMC saying the mailbox is not avaiable.

SolutionRun the following command in Exchange Powershell.
clean-mailboxdatabase <Database Name>

Outlook Web App Functionality Disabled

Scenario: When a user is in Outlook Web App (OWA), they may be experiencing one of the following issues:
  • Conversations are not being expanded.
  • Composing new or replying to messages is not possible due to the body or other parts of the message being disabled or greyed out.
Resolution: There was a DivX Plug Web Player HTML5 add-on in Internet Explorer that I had to disable. To disable this add-on, click on Tools-->Manage add-ons.
Troubleshooting Note: There may be other add-ons causing this issue as well where you might have to perform process of elimination with disabling/re-enabling add-on's.

Outlook Web App Functionality Disabled

Scenario:  When a user is in Outlook Web App (OWA), they may be experiencing one of the following issues:
  • Conversations are not being expanded.
  • Composing new or replying to messages is not possible due to the body or other parts of the message being disabled or greyed out.
Resolution: There was a DivX Plug Web Player HTML5 add-on in Internet Explorer that I had to disable.  To disable this add-on, click on Tools-->Manage add-ons. 
Troubleshooting Note: There may be other add-ons causing this issue as well where you might have to perform process of elimination with disabling/re-enabling add-on's.

Tuesday, October 15, 2013

View the Global Address List on ios device

Task: View the Global Address List on your iPad/iPhone.
PreReq: Contacts need to be enabled on the Exchange account on your iPad/iPhone.
 
Steps: 

1. Tap Contacts.
2. Tap Groups.
3. Tap your Exchange account name (e.g. Exchange) in the Directories section.
4. Enter a name and tap Search. (Your search criteria must be over 4 characters)
5. Tap the user account you are searching for.
6. The user's information will appear.
 
From here you can call, email, or gather contact information for the users you search.

Monday, October 14, 2013

modify domain names for hybrid org relationship

​Task: Modify domain names configured for an organization relatinship in a hybrid deployment
you can use powershell command below to complete task
$domains = (get-organizationrelationship 'On Premises to Exchange Online Organization Relations
hip').domainnames
 
Set-organizationrelationshp -id  'On Premises to Exchange Online Organization Relations
hip' -domainnames $domains

Friday, October 11, 2013

Add X500 Alias to Mailboxes with Old LegacyExchangeDN Value

Scenario: A user receives a bounce message (Non Delivery Report/NDR) when emailing to an internal user that contains the following:
 
Delivery has failed to these recipients or groups:

John Test<mailto:IMCEAEX-_O%3DYOUR%2B20ENTERPRISE%2B20EXCHANGE_OU%3DEXCHANGE%2B20ADMINISTRATIVE%2B20GROUP%2B20%2B28FYDIBOHF23SPDLT%2B29_CN%3DRECIPIENTS_CN%3DJTest451a@domain.edu<mailto:3DJTest451a@domain.edu>>
The e-mail address you entered couldn't be found. Please check the recipient's e-mail address and try to resend the message. If the problem continues, please contact your helpdesk.
Cause: This issue occurs because the value for the LegacyExchangeDN attribute changed. The auto-complete cache in Microsoft Outlook and in Microsoft Outlook Web App (OWA) uses the value of the LegacyExchangeDN attribute to route email messages internally.
 
Resolution: Global Fix - Creating an X500 address based on the LegacyExchangeDN and adding it as an email alias to the recipients Exchange mailbox.

Copy/Extract the LegacyExchangeDN info from the NDR. This is located under the Generating Server portion. It looks like this:
 
Perform the following on that address:
•Replace any underscore character with a slash character /
•Replace +20 with a blank space.
•Replace +28 with an opening parenthesis character (.
•Replace +29 with a closing parenthesis character ).
•Delete IMCEAEX-.
•Delete @domain.edu.
Final Result: /O=YOUR ENTERPRISE EXCHANGE/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=JTest451a
 
Take the final result and add this as an X500 alias for the receiving mailbox by performing these steps:
1. Open the properties of the affected mailbox in Exchange 2010.
2. Click on the Email Addresses tab.
3. Click the drop down menu next to Add... and select Custom Address.
4. In the Custom Address properties window:
i. Email Address: /O=YOUR ENTERPRISE EXCHANGE/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=JTest451a
ii. Email Type: X500
5. Click OK out of all the mailbox windows and you are done.
 
Testing: You should be able to enter in the X500 into a new mail message and perform a check names. It should resolve to the users account.
 
 
Notes

Thursday, October 10, 2013

Exchange PowerShell to Recover Mailbox Items in Exchange 2010.

Scenario: A user is missing mailbox items because they were accidentally deleted or moved from the mailbox and the user cannot find these missing items in their "Recover Deleted Items" folder accessible in Outlook. (Note: How to access the Recover Deleted Items section in Outlook: Outlook 2010 & Outlook 2007)
Next Step: In Exchange 2010 PowerShell, a administrator can use the New-MailboxExportRequest command to create a PST of the users mailbox. The command will export the contents of the mailbox into a PST, in addition reveal the RecoverableItems folder which is a hidden folder in the mailbox that is not seen by Outlook. This folder may contain the contents of the missing items.

Ex2010 Powershell Commands:
Creating the PST Requests:
New-MailboxExportRequest username -filepath \\Servername\Share\File.pst
This will copy everything from the mailbox and put it in a .PST file that you can open in Outlook.

Monitoring the PST Requests:
Get-MailboxExportRequest
-Shows the status of the move requests
Get-MailboxExportRequest | Get-MailboxExportRequestStatistics
-Shows the percentage of completion
You can also attach the |FL shell command to existing command it will show all of the available information attached to the move requests.

After the PST request completes:
Once the PST is finished building, you can open it up in Outlook and try to find the missing mailbox items in the recoverable items folders. If you cannot find the missing items, its possible a restore will need to be performed from backup in order to find the missing data.

Thursday, October 3, 2013

Out of Office Not Working for a Single User

Issue: Out of Office is turned on for a user, but a Out of Office notification is not beingsent to internal/external users. You may see the Out of Office message internally BEFORE you send the message in the Outlook notification bar in the new message window.
Cause: Mailbox rules have corrupted or are conflicting with the Out-Of-Office rule in order to send a message to recipients.
Resolution: The resolution is to remove the conflicting rules in the mailbox. To do this:
1. From a run prompt use the following switch: outlook.exe /cleanrules .This will clean client and server rules for the mailbox. This is the fastest way of fixing this issue.
2. You can manually remove each rule in the mailbox.

Rules of Troubleshooting

​I came across these 8 rules of troubleshooting from the blog site referenced below and found it interesting enough to post it

The 8 Rules for Outstanding Troubleshooting Skills
  1. I always check the Event Viewer or other log files first when troubleshooting.
  2. I do not start troubleshooting until all software/hardware is patched up to the latest approved release.
  3. I do not make modifications unless I have a verified backup, have logged the change and I am reasonably certain what the end result will be.
  4. My job is to provide a solution. A “workaround” means that something is still broke, and I didn’t do my job.
  5. An end user only reports their perception of the situation; It is my job to verify the reality of the situation before attempting to find the solution.
  6. I never assume anything; I always verify everything with my own eyes.
  7. Asking for help from a co-worker implies I have confidence in their ability to assist, it does not imply failure on my part.
  8. I am never afraid to call a vendor or support line for 3rd party products. It’s their product and they will be more familiar with it than I will be leading to a faster resolution.
Reference:

Wednesday, October 2, 2013

"the source data is corrupted or not properly base 64 encoded"

Issue:​
Encoding error trying to import cert from Comodo to Exchange or complete a pending Cert request on exchange server 2010:
"the source data is corrupted or not properly base 64 enocded"
Resolution: Download as X509 Certificate only, Base64 encoded from Cert Enrollment email sent by Comodo server. This is the enocding that worked for Exchange

Tuesday, October 1, 2013

Offboarding and Onboarding Mailboxes

Offboarding and Onboarding mailboxes to/from Office365
Moving mailboxes 2-way can be done using the EAC from Office365. You may also connect Powershell to Office365 and run any of the scripts below:

Onboarding to Cloud:
$opcred = get-credential [domain\admin]
Get-Mailbox xx| New-MoveRequest -Remote -RemoteHostName 'mail.domain.com' -RemoteCredential $opcred -TargetDeliveryDomain 'o365.mail.onmicrosoft.com'

Offboarding from the Cloud to OnPrem:
$opcred = get-credential [domain\admin]
Get-Mailbox xx| New-MoveRequest -OutBound -RemoteTargetDatabase 'Mailbox Database xxxxxxxx' -RemoteHostName 'mail.domain.com' -RemoteCredential $opcred -TargetDeliveryDomain 'domain name'

Track message logs for a user

Track message logs for a user

Step 1. Determine user's mailbox server
 
run the following scripts from Exchange powershell
 
For eg, to check the log for the recipients from sendertest@test.com:
 
Get-MessageTrackingLog -server servname -sender test@test.com | ft recipients,subject
 
To Get log from a certain time/date to a specific time/date. you can also change  eventid from send to deliver or fail etc
 
Get-MessageTrackingLog -server srvname -resultsize unlimited -start "9/29/2013 8:00am" -end "10/1/2013 3:00pm" -EventId "send" -Recipients test2@domain.edu