Tuesday, 21 January 2020

Client reconnecting to Exchange 2010 after migrating to Office 365


After our first 365 migration we left the mail-server online to export more folders but had an annoying problem where after using Outlook for a while they would start trying to use the old server again as the mail server. It worked, but wasn't quite right - and eventually stopped working altogether.

The reason for this is that Outlook still looks on your local network for an auto-discover virtual directory - so if you need to keep the mail-server on be sure to remove the auto-discovery folder!


  • View your current autodicover information (I tend to take a screen grab)
    • Get-AutodiscoverVirtualDirectory | fl Name, Server, InternalUrl, Identity
  • Remove your autodiscover info (be sure to replace SERVER with your server name)
    • Remove-AutodiscoverVirtualDirectory -Identity “SERVER\Autodiscover (SBS Web Applications)”
    • Alternatively, read what the folder is called, as you may need to run
    • Remove-AutodiscoverVirtualDirectory -Identity "SERVER\Autodiscover (Default Web Site)"
And that should fix it!

Migrating from On Premise Exchange to Office 365 - upload PCs from the server

We're doing a lot of migrations at the moment; everyone seems to want to dump their on-premise exchange server and head to the cloud. I've read a lot about 365, but something managed to pass me by and this week (3rd migration) I've finally found out about it.

Importing PSTs to the 365 servers from their side; how I missed this I just don't know.

This new process has shaved a lot of time from the migrations, so here goes the new work routine:

1. End of play for the weekend; change MX records to point to 365 and turn off port 25 and 443 on networks firewall
2. Use Exchange Powershell to export all of the PST files from the server into a folder
3. Use AzCopy to upload the PSTs to Office 365
4. Create a mapping file and upload it to Office 365
5. Run the mapping file and import the PST files into the mailboxes
6. Add the accounts to all PCs and off we go

To do step 3 you need to get your SAS URL which is generated from the Office 365 portal and then enter it into the AzCopy cool (its basically the destination on an Azure cloud server).

Read the full Microsoft Documentation here

Here are a few useful commands that you may need following the above steps:
  • Having trouble exporting emails from the server because of bad items in a mailbox? use the below switches:
    • New-MailboxExportRequest -mailbox jsmith -filepath "\\server\PST\jsmith.pst" -baditemlimit 50000 -acceptlargedataloss
  • Need to view the progress?
    • Get-MailboxExportRequest
  • Want to clear the finished exports from the report?
    • Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
  • Here's an example from the mapping file:
    • Workload,FilePath,Name,Mailbox,IsArchive,TargetRootFolder,ContentCodePage,SPFileContainer,SPManifestContainer,SPSiteUrl
    • Exchange,,jsmith.pst,jsmith@contoso.co.uk,FALSE,/,,,,
  • Still having people connecting to the old server after migration? did you remember to turn auto-discovery off on the server? read me!


WordPress redirecting to Random Websites such as tomorrowwillbehotmaybe

A client recently had a problem with their WordPress site where it kept redirecting to a random URL - investigation showed that it went to tomorrowwillbehotmaybe in this instance.

The site hasn't been updated in a while (they are self client managed), and the issue appeared to be with a plugin called 301 simple redirect.

Disabling the plugin by renaming the plugin folder resolved the issue and the client could get back into the site as needed. Seems as though this particular plugin has a security hole in the older versions which got plugged - fine as long as the sites getting updated!

Monday, 1 July 2019

Exchange 2010 - OWA Outlook web App couldn't connect to Exchange Web Service due to a configuration error. Response code = "null, webexception.status = RecieveFailure" Can't delete emails OWA

Having moved a few Exchange 2010 servers over to TLS 1.1 and 1.2 one of the more recent ones we did kept coming up with the following error when trying to delete emails from OWA

Outlook web App couldn't connect to Exchange Web Service due to a configuration error. Response code = "null, webexception.status = RecieveFailure"

The error message in OWA when trying to delete email is as below:



This is a by-product of using TLS 1.1 and 1.2 - the internal schannels seem to struggle communicating with it if things aren't just quite right.

We managed to fix it by checking all of the following:

- Ensure you're running Exchange Rollup 28 for SP3 (lower versions may work, but we got it sorted after 28)
- We disabled TLS 1.0 and enabled 1.1/1.2 using IISCrypto but upon checking the registry keys, they were all set to ffffffffff instead of 1

Therefore, double check the following if using IIS Crypto

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]“DisabledByDefault”=dword:00000000“Enabled”=dword:00000001
“DisabledByDefault”=dword:00000000
“Enabled”=dword:00000001
“SystemDefaultTlsVersions”=dword:00000001
“SystemDefaultTlsVersions”=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
And then also check that .net 3.5.1 has TLS 1.2 enabled:
The next step is to enable TLS 1.2 for .NET Framework 3.5.1. To do this, make the following registry changes:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
After doing all of the above we rebooted and the issue seemed to be resolved.

Exchange 2010 Rollup 27 - Installation ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again.

We've been upgrading exchange servers to Rollup 27 and this old chestnut has reared its head again:

Installation ended prematurely - rolling back changes

The solution? run the installation from an elevated command prompt

Wednesday, 26 June 2019

Windows May Update 1903 enabling Sandbox mode and turning on Virtualisation on ASUS ROG AMD system SVM/Virtualisation

With the latest Windows update (May 1903) we get a new feature called Windows Sandbox. This allows us to run a sand-boxed (protected, isolated, quarantined) version of windows for opening dodgy files/testing etc. when you've finished with the sand-box and closed it the settings are gone and whatever damage/changes were made are gone for good.

This comes with Windows 10 Pro and above!

To enable sand-boxing, you firstly need to check if you have virtualisation enabled on your system, and that is supports it.

1. Open command prompt
2. Type "systeminfo" and press enter
3. Look for the Hyper-V line that says "Virtualisation Enabled in Firmware"

If its "Yes" then you're good to go. However, if like mine it says "No" then I had to reboot my system and enable it in the BIOS.

Typically, I couldn't find a Virtualisation Option anywhere. I have an AMD machine with an ASUS motherboard, and to enable it you need to find an option called SVM. On my system this was under the advanced view (as opposed to the EZ view), and then the advanced section, CPU Settings and then SVM

Once done, you can now add this feature to Windows by searching the start menu for "Turn windows feature on or off"

When this window is open, tick the "Windows Sandbox" option and let Windows install the new feature. After its finished you will be prompted to reboot.

And that's it! the Sandbox should be on your start menu under "Windows Sandbox"; running it opens up a virtual Windows 10 ready for you to destroy

Wednesday, 19 June 2019

Enable Google Face Recoginition in Google Photos - UK

It recently came to my attention that folks in the US and other parts of the world get access to a great feature called "Google Face Recognition" - something that's been blocked in the UK due to GDPR issues amongst other things.

I wanted this feature, and with a little bit of effort you can enable it in your own account

1. You'll need a VPN to use so that your browser thinks you're in the US
2. I used "tunnelbear" (i have no affiliation with them). URL below:
https://www.tunnelbear.com/download

3. If you're using chrome, download the chrome browser extension
4. Sign up to tunellbear for their free 500MB account, its more than enough
5. Once you're signed up, click the VPN button and connect to the US. Icon looks like the below in the task bar:
6. Once connected, you can then sign into Google Photos
7. And thats it! Face Recognition should be enabled - you can check it under Settings > Group Similar Faces

One thing to bear in mind is that it takes a few days for Google to crawl all of your photos, and then eventually you should get a new album called "People and Pets" where you can then name each face and group them together

Love it!