Home » Posts tagged 'exchange 2013'

Tag Archives: exchange 2013

Exchange 2013 OAB Download Error (0x80190194) : ‘The operation failed

Recently I had an issue where users could not download the offline address book using any version of outlook. The error users report is Task ‘email’ reported error (0x80190194) : ‘The operation failed

There are many blog posts on the net that give different fixes for this error but in my case the problem still persisted.

I was able to observe the OAB files being updated on the server, I was able to browse the OAB.xml file from the client web browser, Outlook Test Connection returned the correct OABURL in the XML response. There were no errors on the client or server side event logs that suggested any hint of an issue. After a day of frustration I found the cause of the problem through off-piste troubleshooting which turned out to be corrupt arbitration mailboxes.

I should probably state that this environment was a migration from 2007 to 2013 previously so I think that perhaps the migration did not go that smoothly, but exchange quietly hid the issue.

Anyway to fix the issue this is what I did

(more…)

Move Arbitration Mailboxes to New Database

To Move all the hidden system mailboxes from a database to another (or arbitration mailboxes) use the following powershell commandlet in EMS

Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase <target databse>

 

Remove Soft Deleted Mailboxes from Exchange Database

When moving mailboxes between databases you sometimes experience the moves completing with a warning. The warning may be that post move cleanup could not be completed on the source mailbox database. This means that you will see disconnected mailboxes in EMC even though the users mailbox is live on the other database. In this circumstance you need to remove the disconnected or soft deleted mailboxes from the old database to free up space.

You can do this by first obtaining the mailbox GUID of the soft deleted mailbox using this command

Get-MailboxStatistics -Database <dbname> | Where {$._DisconnectREason -eq "SoftDeleted"} | fl MailboxGuid

Then you can use the output of this to then remove the mailbox using this command

Remove-StoreMailbox -Database <dbname> -Identity <mailboxguid> -MailboxState SoftDeleted -Confirm:$false

To remove all soft deleted mailboxes from a database in one go you can use this command

Get-MailboxStatistics -Database MBD01 | where {$_.DisconnectReason -eq "SoftDeleted"} | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted}

Adding Out Of Office Notice to Exchange User’s Mailbox Using Powershell

Administrators can set user’s OOO notifications directly from EMS by using the following command

Set-MailboxAutoReplyConfiguration <alias> -AutoReplyState enabled -ExternalAudience all -InternalMessage <Message to internal senders> -ExternalMessage <Message to external senders>

Creating a Receive Connector for TLS (Encrypted) E-mail Exchange 2013

Email transmissions between companies sometimes need to be encrypted in transit. In order for this encryption to work across links both exchange servers must have a valid and trusted SSL certificate. If using Internal CA certificates, both exchange servers must have the each others Root CA cert and any Intermediates installed locally in the relevant certificate stores, and must be able to lookup the certificate revocation list of the certificate. Therefore each network myst have a CRL publishing point available to each other.

To create a Receive Connector to accept TLS encrypted email you must first declare the remote email domain in the TlsReceiveDomainSecureList of exchange 2013. This is done using the Set-TransportConfig exchange management shell command

Set-TransportConfig -TLSReceiveDomainSecureList @{Add="remotedomain.com"}

Now to create the receive connector

New-ReceiveConnector -Name TLSReceive -Usage Custom -Bindings "10.0.10.10:25" -TransportRole "FrontEndTransport" -AuthMechanism TLS -DomainSecureEnabled $true -Fqdn "tlsmail.domain.com" -RequireTLS $true -TlsCertificateName [s]subject name

To get the subject name of the certificate use the Get-ExchangeCertificate cmdlet.

Removing Soft Deleted Mailboxes from Exchange

When performing mailbox moves sometimes they complete with warnings. When you interrogate the move log you may find that the move was successful but the request failed to clean up the source database.

Microsoft say they resolved this in Microsoft Exchange 2010 SP3 but I have seen this happen in later releases SP3 CU5 and 2013.

To manually remove these disconnected mailboxes you need to use EMS. First find the disconnected mailbox in the source database

Get-MailboxStatistics -Database <source database name> | Where { $_.DisconnectReason -eq "SoftDeleted" } | fl DisplayName, MailboxGUID

Then use the following command to remove them

Remove-StoreMailbox –Database <source database name> –Identity <user mailbox GUID> –MailboxState Softdeleted

You will need to wait for the maintenance routine to run on the database before the white space is reclaimed

Emailing Users when Password is about to Expire

I had one request from a customer recently that asked if it was possible to email users before the their active directory passwords expire as it was causing issues with remote users.

I created a PowerShell script which I added as a scheduled task on one domain controller that runs once  a day. The script queries AD for the date the user last changed their password and compared it against AD password policy maximum age limit. If this reached a specified time such as 5 days before, the user would be emailed once per day with 5 days to go. Please note that you will need an exchange server or mail server that will allow unauthenticated email to be sent from the DC you home this script on.
$smtpServer=”exchangecasserver.domain.local”
$from = “passwordreminder@domain.local”
$expireindays = 5
#Get Users From AD who are enabled
Import-Module ActiveDirectory
$users = get-aduser -filter * -properties * |where {$_.Enabled -eq “True”} | where { $_.PasswordNeverExpires -eq $false } | where { $_.passwordexpired -eq $false }

foreach ($user in $users)
{
$Name = (Get-ADUser $user | foreach { $_.Name})
$emailaddress = $user.emailaddress
$passwordSetDate = (get-aduser $user -properties * | foreach { $_.PasswordLastSet })
$maxPasswordAge = (Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge
$expireson = $passwordsetdate + $maxPasswordAge
$today = (get-date)
$daystoexpire = (New-TimeSpan -Start $today -End $Expireson).Days
$subject=”Your password will expire in $daystoExpire days”
$body =”
Dear $name,
<p> Your Password will expire in $daystoexpire days.<br>
To change your password, Logon to the domain Internal Network on a PC / Laptop, press CTRL ALT Delete and chose Change Password <br>
<p>Thanks, <br>
</P>”

if ($daystoexpire -lt $expireindays)
{
Send-Mailmessage -smtpServer $smtpServer -from $from -to $emailaddress -subject $subject -body $body -bodyasHTML -priority High

}

Assigning everyone permission to read each others calendar Exchange 2013

I had a request from a customer the other week asking if it is possible to grant all users read only permission to each other’s calendars in Exchange 2013. The only way to achieve this in bulk is using Exchange Management Shell. Below is the script I created to filter out distribution, room and discovery mailboxes and apply only to user mailboxes

$LogFile = “c:\CalendarPermissions.txt” ;

$Mailbox = Get-Mailbox -Filter {(RecipientType -eq “UserMailbox” -and Name -notlike “Discovery*”)} -ResultSize Unlimited;

ForEach ($MailUser in $Mailbox){

Set-MailboxFolderPermission -Identity ($MailUser.alias+’:\Calendar’) -User Default -AccessRights Reviewer;
$MailUser.Name | Out-File $LogFile -Append
Get-MailboxFolderPermission -Identity ($MailUser.Name+’:\Calendar’) | Out-File $LogFile -Append;

Write-Host “All Users have been granted Reviewer Rights to $MailUser Calendar” -ForegroundColor Green;
}

Unattended Installation of Exchange 2013

Performing an unattended installation of Exchange 2013 is pretty simple. This is useful if you want to install exchange using custom settings such as renaming the default database or placing the database or log files on separate drives etc.

From the installation media folder open command prompt and use the following command line switches to prepare the Active Directory for Exchange 2013

Setup.exe /PrepareAD /IAcceptExchangeLicensingTerms /OrganizationName “ExchangeOrg”

Once completed run the following

Setup.exe /Mode:install /IAcceptExchangeServerLicenseTerms /r:CA,MB /TargetDir: E:\Exchange /CustomerFeedbackEnabled:False /Mdbname:MBXDB01 /DbFilePath:E:\Databases\MBXDB01.mdb /LogFolderPath:F:\Logs\MBXDB01 

Note: If installing Exchange 2013 on multiple servers and you are splitting the Client Access role from the Mailbox role, you must install the first Mailbox server first BEFORE installing a Client Access Server.

Installing Exchange 2013 Server Pre-requisites

To install Exchange Server 2013 requires certain roles and features. These can be automatically installed via the GUI install of Exchange Server, however it is more efficient to install these via PowerShell

Powershell Command

Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation,RSAT-ADDS

This command will install all roles and features required for either the mailbox or client access exchange role.

After the server has rebooted you will need to install the following application packages

UCMA 4.0 SDK http://www.microsoft.com/en-gb/download/details.aspx?id=35463

UCMA 4.0 Client Runtime http://www.microsoft.com/en-us/download/details.aspx?id=34992

Office 2010 Filter Pack http://www.microsoft.com/en-gb/download/details.aspx?id=17062

Office 2010 Filter Pack SP2 http://www.microsoft.com/en-gb/download/details.aspx?id=39668

Reboot once more and then begin the Exchange 2013 Installation.

%d bloggers like this: