Tuesday, February 16, 2016

Sysprep Error with Windows 10

I'm doing some experimentation with Windows 10 deployment and attempted to run Sysprep. When I ran it, I got the following error:
Sysprep was not able to validate your Windows installation. Review the log file at %WINDIR%\System32\Sysprep\Panther\setupact.log for details. After resolving the issue, use Sysprep to validate your installation again.
When I read the log file, I found this:
Package 9E2F88E3.Twitter_4.3.3.0_x86__wgeqdkkx372wm was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
So, apparently the Twitter app that is included by default is causing my issue. I did some research and found references to other packages causing the same issue if Windows 10 communicates with the Internet. The VM I'm using does have Internet connectivity.

To remove the app, I ran the following command. Note that you can use wildcards in PackageName for Get-AppxPackage, such as *twitter*.
Get-AppxPackage PackageName | Remove-AppxPackage

When I ran Sysprep again, I got the same error, except this time it was Candy Crush instead of twitter. After removing Candy Crush in the same way, Sysprep ran fine.

I should note, that I never ran or started either of those applications. So, it seems that it may be a best practice for Windows 10 to prevent your base images from communicating on the Internet. After performing one Sysprep, I was able to run Sysprep additional times.

I think this may have to do with live tiles in the Start menu. Both Candy Crush and Twitter are listed in the Start menu.

Tuesday, February 9, 2016

Outlook 2016 - The connection to Microsoft Exchange is unavailable

This is a unique scenario, because it applies primarily to testing environments. I have a lab setup with Exchange Server 2016 and Outlook 2016. I was going a bit nuts because each time Outlook 2016 tried to configure the profile I got the following error message:
The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.
This error can occur when you get names wrong in your internal or external URLs. So, I verified the names in all of my internal and external URLs. I also tested connectivity in Outlook and the URLs from Autodiscover were correct. Also verified the names in the certificate.

It turned out to be an issue with the default gateway. As part the connection process, Outlook 2016 was attempting to connect with the default gateway (which didn't exist on my test network). When connectivity to the default gateway failed, Outlook provided that error.

To fix this, I pointed the client running Outlook 2016 at a valid IP for the default gateway. I used the IP of my domain controller. It's not important whether it's a router or not, it just looks for an IP that is alive. I've been too lazy to put a packet sniffer on it yet. I'm just happy it's working.

Short version: Make sure clients running Outlook 2016 have a valid default gateway.

Note: Credit to Stan Reimer who actually gave me the fix after it was discovered during development of a Skype for Business course

Update: For an explanation of why this happens, see this post: http://blogs.technet.com/b/rmilne/archive/2014/03/27/outlook-unable-to-connect-to-exchange-_1320_default-gateway-not-found.aspx

Sunday, February 7, 2016

Office Online Server Preview Editing Error

As part of developing the new Microsoft Exchange Server 2016 course, I needed to get Office Online Server Preview (formerly Office Web Apps Server) working with Exchange Server 2016. If you read the instructions it's pretty straight forward. There isn't much to do other than run setup and run a single command to create a farm.

Instructions are here:

The command to create the farm for Office Online Server is:
New-OfficeWebAppsFarm -InternalURL https://office.adatum.com -ExternalURL https://office.adatum.com -Certificate OOSCertificate -EditingEnabled

After creating the farm, you need to set Exchange 2016 to use it with the following command:
Set-OrganizationConfig -WacDiscoveryEndPoint
https://office.adatum.com/hosting/discovery
After running the command in Exchange 2016, you need to restart the MSExchangeOwaAppPool. Or If you're lazy, just do an IISreset.

After this, I was able to send a Word document as an attachment and view it in Outlook on the web. I was impressed with how easy to was. So, on to the next level.

I clicked the Edit and Reply option while viewing the document. The editor opened and I could modify the document. When I watched the status, the document went from Saving to Saved as I edited. Cool. This is working great!

Then I clicked Send. At this point, it said "Saving your document" and then "Attaching your document" It was a this point it failed with the following error message:
Your message couldn't be saved because the attachment is still being edited. Please close all windows where it's being edited and try again.
After receiving this message, the changes in the document were lost and I couldn't edit it again. The message was stuck as a draft that I couldn't send and I deleted it from drafts. I could still view the document, but that's not what I was going for.

On the Office Online Server in the Application log, I saw some events about OneNote being unable to connect to the Word Save service by using HTTP and connecting to 127.0.0.1.

Looking in IIS Manager, the web site for Office Online Server was bound only to port 443. This makes sense because we told it to use HTTPS for everything and gave it a certificate. Why would we want HTTP.


The Fix
The fix for this ended up being allowing HTTP connectivity to Office Online Server. It appears that the preview version doesn't work with Exchange 2016 unless you allow HTTP.

To modify the existing farm I used the following command and then restarted the server:
Set-OfficeWebAppsFarm -AllowHttp

You can also modify the original farm creation command as follows:
New-OfficeWebAppsFarm -InternalURL https://office.adatum.com -ExternalURL https://office.adatum.com -Certificate OOSCertificate -EditingEnabled -AllowHttp

Prerequisite Software
Some of the prerequisites for installing are a bit cranky to get going. Part of the prerequisite software is .NET Framework 3.5. In Windows Server 2012 R2, to install .NET Framework 3.5, you need to have access to the installation media. The process is described here:
You also need to install Visual C++ Redistributable for Visual Studio 2015. If your Windows Server 2012 R2 is fully updated, this won't be an issue. However, if it not, you may get an error indicating that one subcomponent in the redistributable couldn't be installed. This is due to missing prerequisites, but the error from the installer doesn't indicate this.

You need to install KB2919442 and then all parts of KB2919355 in the correct order. Read the installation instructions for KB2919355 to make sure you do it in the correct order.