Unknown's avatar

About Michel de Rooij

Michel de Rooij, with over 25 years of mixed consulting and automation experience with Exchange and related technologies, is a consultant for Rapid Circle. He assists organizations in their journey to and using Microsoft 365, primarily focusing on Exchange and associated technologies and automating processes using PowerShell or Graph. Michel's authorship of several Exchange books and role in the Office 365 for IT Pros author team are a testament to his knowledge. Besides writing for Practical365.com, he maintains a blog on eightwone.com with supporting scripts on GitHub. Michel has been a Microsoft MVP since 2013.

ManageScheduledTask.ps1 issue uninstalling Exchange


Today I encountered a strange issue when trying to decommission a DAG member, after properly removing it from the DAG as explained here, and checking services like address book generation server where hosted on one of the other DAG members.

I started the removal process from an elevated command prompt (using the GUI doesn’t work as it complains about the need to use setup.com, which I can’t since I’m using the GUI):

setup /m:uninstall

The output was the following:

Hmm. Without even looking at the Exchange setup log, I noticed there was something strange with the error message:

The term ‘C:\Program Files\Microsoft\Exchange Server\V14\Bin\ManageScheduledTask.ps1’ is not recognized as the name of a cmdlet, function, script file, or operable program.

As you probably know, all Exchange scripts are located in the Scripts folder, not the Bin folder.

I tried a quick and dirty fix, which was to copy the ManageScheduledTask.ps1 and ManageScheduledTask.strings files to the Bin folder, and again started setup /m:uninstall. This time, Exchange uninstalled nicely.

From experience, this isn’t expected behavior, but in case you encounter this problem in the field, you now know how you can easily work around this.

Update: I’ve seen identical issues when retrying an upgrade on Exchange 2010 SP1 to SP2. I think the problem is code-related (i.e. bug), as the uninstall part of the upgrade process should check for those files in “scripts”, not “bin”. Note that with case of the failing SP2 upgrade, the file EnterpriseServiceEndpoints.xml was also MIA (that one should be in bin). I worked around that by copying the file from the installation source.

Exchange UM and Lync issue using wildcard certificate


Recently, after installing and configuring Lync in an Exchange environment, a customer had issues like not being notified of voice-mail messages (also known as MWI or Message Waiting Indicator) and things like play-on-phone wasn’t working properly. To configure Exchange UM and Lync integration, the customer used the ExchUCUtil.ps1 script on Exchange and OCSUMUtil.exe tool on Lync. They also applied a valid, not-self signed certificate for Exchange UM services, as stated in the official instructions here.

Attendants and Subscriber Access was functioning properly, as well as call diversion to voicemail. Also, people were able to retrieve and replay voicemail messages.

So, apparently communications originating from Lync to Exchange was working, but from Exchange to Lync wasn’t.

I started off by inspecting the eventlog on the Exchange Server. Here I noticed UMCore process generated event 1400 periodically when trying to contact the UM IP gateway (Lync server):

TimedOut@ExchangeUM

This provided a clue as to what I already expected; the Lync server wasn’t responding to Exchange.

A quick search led me to this blog, which is mainly a checklist. Since Lync and Exchange were able to set up an RPC session and after verifying the ability to communicate from Exchange to Lync by doing a telnet on port 5061, I concluded networking wasn’t the issue and required services seemed to be running properly.

Next, I increased the logging level for all UM related components using:

Get-EventLogLevel “MSExchange Unified Messaging\*” | Set-EventLogLevel –Level Expert

I created a new voicemail message and after a short while MWI General event 1344 showed up:

MWIFail@ExchangeUM

Again, an indication signaling from Exchange to Lync didn’t work. Because I was able to open communications on port 5061 earlier on, I suspected Lync might be rejecting or refusing communications for whatever reason. Therefor, I connected to the Lync server. Since no clues were found in the event  log, I fired up the Lync Server Logging Tool. I turned on logging for SIPStack, checked All Levels and All Flags and started logging. Since I didn’t want to wait for the UM contacting Lync cycle and because it was a live system so a lot of SIP traffic was expected, I quickly created another voicemail waited a while (for accommodate for Voicemail Preview generation) and stopped logging. Next, I selected Analyze Log Files to inspect the results.

Note: Analyze Log Files requires installing the Lync Resource Kit as utilizes the Snooper tool; hardcore SIP fanatics may prefer the Notepad view and click on View Log Files instead.

When going through the events I noticed the following dialog between the Exchange server (srv12) and Lync (srv03):

ErrorMsg@LyncLogger

After establishing a TLS session (so SIP secured was configured properly on both sides), the Lync Server received a SIP OPTIONS request after which it actively terminated the connection returning “The peer is not a configured server on this network interface” . The details section of this message displayed the following:

ErrorMsg@LyncLogger - Details

Now I have obfuscated the remainder of the FQDN, but as you probably still can see is that it states a wildcard as FQDN, e.g. *.contoso.com. Since “*.<something” isn’t a valid FQDN, Lync server wasn’t too blame for rejecting communications. I went back to the Exchange server because I suspected it might be a certificate issue and because I learned that the FQDN shown was the subject (CN) of the wildcard certificate used (and wildcard certificates aren’t supported by Lync).

I opened up the Exchange Management Console, went to Server Configuration to view the certificates. Indeed the public wildcard certificate was used for UM services. Luckily there was already another internal certificate in-place for Exchange,with the host FQDN as subject. I selected it, opened up Assign Services and activated it for UM (which automatically disables UM for the other certificate).

CfgUMCert@ExchangeUM

After switching certificates for UM, UM services like MWI and play-on-phone started working properly.

Apparently, the instructions “If you didn’t choose to create a wildcard certificate .. you must use a public certificate if you are using Unified Messaging with Office Communications Server” isn’t complete, since Lync verifies the certificate’s subject against the FQDN of the host it’s talking to. So that rules out certificates with a wildcard Subject (CN). Unfortunately, the certificate creation instructions don’t rule out (public) wildcard certificates for UM and there’s no mention of limitations regarding the Subject. I assume originally the customer created an improper – yet technically valid – request for an “all in one” certificate for internal usage and applied the result to all Exchange and Lync services, breaking UM – but not IIS nor SMTP, in the process.

Update: Turns out the requirement for non-wildcard subjects in certificates subject names is mentioned in the Supportability section of the Lync documentation on TechNet here. It reads: “There is no support for a wildcard entry as the subject name (also referred to as the common name or CN) for any role”.  Using wildcards as one of the Subject Alternate Names (SAN) is supported for most Lync roles. Since a lot of people find certificates challenging and troubleshooting improperly configured certificates isn’t everyone’s favorite pastime, being as clear as possible helps a lot. In my opinion, the certificate generation page should mention limitations or requirements and a link to the supportability page wouldn’t hurt. Luckily, in this case the issue can easily be solved using a trusted certificate generated by an internal CA.

2011, a short Retrospective


Happy new year to all my dear readers and followers. It’s been an interesting year, both from a personal (2nd kid) as well as a professional perspective (job change). It’s also a year with less blogging and community participation than originally planned. Therefor I’ve recycled my New Years’ resolutions of 2011 for 2012. I continue hoping that what you find here may help you in some way.

I’d also like to share with you some blog statistics of 2011, it’s 2nd year running:

Next to the Main, Versions, Builds and Dates and Toolkit pages, these were the Top 5 posts of 2011:

Top 5 posts of all time:

Top 5 referrers of 2011:

Again, thanks for visiting and keep coming back! Don’t forget, you can also follow me on Twitter.

Delegated Sent and Deleted Items behavior


Many people using Outlook access multiple mailboxes, either because the mailbox is shared or they are a delegate (e.g. they have send-as permissions). What many users find confusing is that by default, Outlook will put the copies of all sent messages in the Sent Items folder of the default account. For example, when Peter sends a message as John, users expect Outlook to put the message in the Sent Items of John. Also, when Peter deletes a message from John’s mailbox, it will end up in Peter’s Deleted Items folder.

image

Luckily, this behavior can be altered for Outlook 2003, Outlook 2007 and Outlook 2010 using two registry settings. In order for these setting to work, Outlook needs to have a certain hotfix; which hotfix depends on the Outlook version used. Note that a later service pack or hotfix may already contain this setting:

To enable the different Sent Items behavior, you need to create or edit the a value named DelegateSentItemsStyle, type REG_DWORD and set it to 1 (default is 0 or not present). The location of the registry value is HKCU\Software\Microsoft\Office\<version>\Outlook\Preferences, where <version> depends on the Outlook version used; use 11 for Outlook 2003, 12 for Outlook 2007 or 14 for Outlook 2010.

To alter the Deleted Items behavior, create or edit a value named DelegateWasteBasketStyle, type REG_DWORD and set it to 4 (default is 8 or not present). The location of the registry value is HKCU\Software\Microsoft\Office\<version>\Outlook\Options\General; for version number use one of the values mentioned before.

After implementing these registry values, either manually or by publishing them in group policies, sent items and deleted items will be stored with the mailbox:

image

Note: these registry keys only work when using Outlook in Cached Mode; more information in kb2703723.

 

Forefront Protection for Exchange Rollup 4


Microsoft released Hotfix Rollup 4 for Forefront Protection for Exchange Server (KB2619883).

Here’s the list of fixes included in this rollup:

  1. Email is sent to the Forefront Protection for Exchange UNDELIVERABLE folder instead of being delivered
  2. UNC and proxy credentials are stored in clear text in the Forefront Protection for Exchange file system
  3. The Forefront Protection for Exchange FSEMachinePrep.exe fails with a fatal error
  4. The external sender does not receive the expected Forefront Protection for Exchange generated notification
  5. Forefront Protection for Exchange generates a notification with a blank subject line
  6. Forefront Protection for Exchange virus engine updates fail between the passive node and active node in CCR clusters
  7. Forefront Protection for Exchange only accepts 7-digit License Agreement numbers
  8. Forefront Protection for Exchange generates a 2098 event ID every time the MSExchangeTransport service is restarted
  9. Email queues at startup on an Exchange server running Forefront Protection for Exchange

For more details on the fixes consult the knowledge base article. You can request the hotfix rollup directly from the support center here.