Unknown's avatar

About Sean O'Farrell

Behind the scenes of this blog is me, Seán O'Farrell. I am the principal Microsoft security architect in eir evo, in Dublin, Ireland. My blog posts are completely my own views & provide no warranty. My blog posts are in no way affiliated with my current employer, Microsoft, Quest or any vendor’s technologies mentioned in my blog. Focused on all Microsoft security products and services specifically Defender * and Purview.

Cloud Accelerate Partner Support

One of the benefits of being a Microsoft Cloud Accelerate Partner is that you can get dedicated  Cloud Partner Support which is available 24 Hours a day 7 days a week.

So how do you access this benefit as there is no dedicated phone number.

The way you access the Cloud Partner Support team is by logging a service request via your partner tenant. So you can log a service request through your own partner tenant for one of your customer’s tenants.

This really is an excellent service. Its like having a Microsoft Premier Support contract. I have logged a number of service requests via the Cloud Partner Support team and their response time is excellent.

HERE is a document providing an overview of the Cloud Deployment Program Overview

QUEST NME unable to create admin pool

In the image above I ran into an issue when trying to create an admin pool for on Quest Notes For Exchange migration toolkit.This was for a migration to Exchange Online.

So the first thing i did was set-executionpolicy unrestricted -force on both the x64 and x32 versions of powershell. But that didn’t fix the issue.

Most enterprises have quite a few group policies and sometimes these policies are applied before the machines have been moved to an OU that has inheritance blocked.

So to remove the group policies causing the issue. 

Browse to HKLM\Software\micrsoft\windows\currentversion\group policy and then delete any S-x-x-xx-xxxxxxxxxxxxxx keys.
Ensure you have the Windows Azure Active Directory Module for powershell installed on all the nme machines.

Once I had removed all the group policies I could create the admin pool and proceed with migrations.

An internet connection is required to ensure that your subscription for Microsoft Office is not interrupted

I have a customer that has a new wave 15 Office365 tenant and click to run is not compatible with Windows XP. Like most corporate customers , my customer had a proxy.

So I ran the Office365 readiness assessment tool which you can download HERE 

The results of the test stated that Office365 ports could not be contacted.

The reason for this is because Office365 communicates to the service via networkservice.

Lets say my proxy was 1.1.1.1:8080 then run the following command and Office will activate fine.

bitsadmin /util /setieproxy networkservice MANUAL_PROXY 1.1.1.1:8080 “”

If you need bitsadmin for xp you can download it HERE .

Exchange Hybrid GAL not populating

As per one of my previous posts HERE on how to edit active directory attributes , When dirsync  is enabled it wont populate the GAL with exchange online and exchange on-premise.


Lets say my email address is sean@contoso.com. 

You need to populate some ad attributes.

Proxy Address: SMTP:sean@contoso.com & smtp:sean@contoso.mail.onmicrosoft.com
Target Address: SMTP:sean@contoso.mail.onmicrosoft.com
UPN:sean@contoso.com

So after those attributes have been synced via dirsync run this powershell command in the exchange management shell 

Enable-RemoteMailbox sean@contoso.com -RemoteRoutingAddress sean@contoso.mail.onmicrosoft.com

So once this is done all you need to do is apply a license and usage location to sean@contoso.com

And then the GAL will be populated between Exchange On premise and Exchange online.

An encrypted connection to your mail server is not available

I have been working on a Hybrid Exchange project recently and when I was using my own laptop on my customer’s  domain , I could connect to a test exchange online mailbox without any issues.

But any machine on their network could not connect via autodiscover to an exchange online mailbox.So a couple of points to note.

When running an exchange hybrid the ‘autodiscover.contoso.com‘ will point at your hybrid servers and when the outlook client hits the hybrid server the client will be directed to the correct mailbox location by the hybrid server.

So our good friend the Exchange Remote Connectivity Analyzer can perform a test on both an on prem exchange mailbox and an office365 mailbox and when the outlook client hits the https://autodiscover.contoso.com/autodiscover/autodiscover.xml the outlook client gets routed to the correct mailbox. But in the case of an exchange online mailbox , http redirection occurs until it reaches the exchange online autodiscover.xml which for example could be https://autodisocver.contoso.mail.onmicrosoft.com/autodiscover/autodiscover.xml

Another test we can do is by running the ‘Test Email AutoConfiguration’ tool in Outlook as per the image below. There are quite a few re-directs until outlook finds the correct exchange online mailbox.
So in my particular scenario my Outlook could connect fine but domain joined laptops could not and this was because of a group policy which is displayed below which was blocking the http redirects required to connect to the exchange online mailbox.
So how to fix this , well firstly remove the group policy and secondly you can edit 4 registry settings as follows and as per the image below in hkey_current_user\software\microsoft\office\14.0\outlook\autodiscover

ExcludeHttpRedirect 0
ExcludeHttpsAutoDiscoverDomain 0
ExcludeHttpsRootDomain 0
ExcludeSrvRecord 0

So now all your Outlook clients in Hybrid mode will be able to connect via autodiscover.







Exchange Hybrid Mailbox Migrations slow when using TMG

When using Exchange online in Hybrid mode , if you want to have a unified global address list with exchange online users and onpremise users then you need to create on premise blank mailboxes for the users that you want to use exchange online and then create ‘remote move requests‘ to move the onpremise mailboxes to exchange online.

During the move request , if you open the log you may see ‘Relinquishing job because the mailbox is locked‘

So in order to fix this and really speed up the remote move requests we need to go to the intrusion prevention section of TMG and then the Behavioral Detection\Configure Flood Mitifgation Settings as per the image below.

We click on the link for Configure Flood Mitigation Settings and then click on ‘IP Exceptions‘ and create a new computer set. In the image below I called it ‘Exchange Online Protection‘ and add a computer set with the exchange online protection range as per the image below

All of the Exchange Online Protection IP ranges can be found at this SITE 

You can susbscribe via RSS feed HERE to the Microsoft Online IP Ranges 

So now Remote move requests will migrate a lot quicker 🙂 

Migrating Lotus Notes users into an Exchange Hybrid

In this post I just wanted to highlight what active directory attributes need to change on a user account when you have an existing Exchange Hybrid and want to migrate Lotus Domino users into exchange online.

Primary Email Address: Sean@contoso.com
Hybrid email Domain: contoso.mail.microsoft.com

The existing users that have exchange mailboxes will already have exchange active directory attributes. So lets take a look at what happens when you migrate an on premise exchange mailbox to exchange online.

When you run dirsync , a proxy hybrid domain is created in the example above it is contoso.mail.microsoft.com. So when you initiate a ‘new remote move request‘ and move an onprem user to the cloud the user becomes a mail contact and their routing email address becomes


So how do we populate the active directory users that have came into our active directory from Lotus notes with the right attributes so that when they sync with dirsync to exchange online they will have the correct PRIMARY email address and be able to co-exist with the onpremise users.

We use my good friend ADMODIFY to modify some key attributes

So in this example the default email address policy is firstname.secondname@contoso.com

So we connect to our active directory via admodify and select all the users or organisational units we want to modify and add them to the list we then enter ‘%’givenname’%.%’sn’%@contoso.com‘ on  the email address tab


So now that we have modified this attribute the user’s primary email address will be ‘firstname.secondname@contoso.com‘ when synced with dirsync.

We need to make sure the users have the correct UPN and this can be done by viewing one of my previous blogs HERE

We need to modify one more attribute as these users will be in exchange online and will need to co-exist with the exchange on premise users.So as per the image below  we enter the following syntax ‘SMTP:%’givenname’%.%’sn’%@contoso.mail.microsoft.com‘ in the ‘targetAddress‘ attribute.


So the beauty of ADMODIFY is that you can modify thousands of users attributes in a couple of minutes and if something goes wrong it writes the config changes to an xml file. So you can quickly undo the changes you made if there were problems.
SO KEEP THE ADMODIFY CONFIGURATION XML FILES SAFE!

Lets say you don’t want some users to sync to exchange online , you can filter them by what organisational unit gets synced or you can use admodify again to modify a custom attribute by entering ‘nooffice365‘ as per the image below in the ‘extensionAttribute10‘ attribute


Ok so now we have users in exchange online and we have no dirsync error notification emails. How do we mass activate them. Well we run two powershell commands.

  1. We set the user’s location , in this example the country is US
    Get-MsolUser -UnlicensedUsersOnly |Set-MsolUser -UsageLocation US
  2. Get-MsolUser -UnlicensedUsersOnly | Set-MsolUserLicense -AddLicenses “Contoso.com”:EXCHANGESTANDARD
Now we have populated our Active Directory with all the correct attributes that will enable co-existence and mass activated those users via powershell.

So now its over to my choice of software for Lotus Notes migration.

I will post a step by step blog on setting up quest nme next month. This post was to show people how to prep ad and exchange online for mass migration to exchange online where an existing hybrid was in place.

Note:
Quest NME will not populate the GAL as the source directory will be Lotus Notes and target directory Exchange Online.So to populate the gal after you have made all the attribute changes above run this command in the exchange management shell Enable-RemoteMailbox sean@contoso.com -RemoteRoutingAddress sean@contoso.mail.onmicrosoft.com


Bulk activation of Office365 Users

When using DirSync and ADFS it can take a long time to activate thousands of users. So here is a really quick way of doing it.

Firstly HERE is a great article on msexchangeguru.com on dirsync filtering. So there are plenty of organisational units in Active Directory that do not need to be syncronised to Office365.

So I always filter the OU’s that are synchronized to Office365.

Within the organisation section of the Office365 portal make your external domain which has been verified the default domain.

Ensure all user’s have the correct User Principal Names as per one of my previous BLOGS 

So once all the user’s have been synced to Office365 , they need a license assigned to them.

So connect to Office365 via the Windows Active Directory Module for Windows Powershell and do the following.

connect-msolservice # and enter an Office365 Global Administrator’s credentials.

Get-MsolAccountSku  # this will tell you what office365 skus are available. For this example it will be EXCHANGESTANDARD


As all of the users are currently unlicensed , we will set a location for the users as per the command below and the location will be us.

Get-MsolUser -UnlicensedUsersOnly |Set-MsolUser -UsageLocation US

Then we will add a mailbox for all the users that were synced and we can do so with the following command.

Get-MsolUser -UnlicensedUsersOnly | Set-MsolUserLicense -AddLicenses “Contoso”:EXCHANGESTANDARD

Now all the users have a mailbox and can start using Exchange Online 🙂

Office365 ADFS 2.0 with full SQL Server

As per my previous post about DirSync for Enterprise organisations , We also need to install ADFS farms into SQL clusters for high availability and scalability. So below are the steps to install ADFS 2.0 into a SQL Cluster.

In this example on how to set this up for the purposes of this demo , Please take note of the following items.

Domain:contoso
ADFS Server : adfs.contoso.local
SQL Cluster: sqlclus
ADFS Service Account: contoso\adfs
ADFS Service Name: signin.contoso.com

  1. Download and install ADFS 2.0 RTW which you can download HERE The ADFS 2.0 installer installs the pre-requisites required for the software.
  2. Do not open the ADFS configuration wizard after the install has complete, Download and install ADFS 2.0 Rollup 3 which you can download HERE 
  3. Now get your trusted ssl certificate for your adfs service name ‘signin.contoso.com‘ and bind it to the default site. I always remove any http bindings for the default website on your adfs lan server.
  4. In certificate manager. Right Click on the trusted certificate ‘signin.contoso.com‘ and select all tasks\manage private keys and then add the contoso\adfs service account permissions ‘Full Control & Read’
  5. From a command prompt with elevated privileges make this the current directory  C:\Program Files\Active Directory Federation Services 2.0\
  6. Now we are ready to create the ADFS farm and we do so with the following command

    FSConfig.exe CreateSQLFarm /ServiceAccount “contoso\adfs” /ServiceAccountPassword “password” /SQLConnectionString “database=AdfsConfigurationServer;server=sqlclus;integrated security=SSPI” /port 443 /FederationServiceName “signin.contoso.com” /CleanConfig /AutoCertRolloverEnabled

    And you will see the following output from the command prompt window

  7. Ideally the lan adfs servers will be load balanced , If you need to use a sql cluster for your adfs deployment then there is a good chance the customer will have load balancers like F5, Netscaler or Kemp.My preference would be Kemp.So there will be a virtual ip for the ADFS Service name ‘signin.contoso.com‘
  8. To enable kerberos authentication to Outlook Wep App and Sharepoint , place the https://signin.contoso.com into the intranet settings in Internet explorer for clients via group policy.
  9. ADFS proxy servers will be in a DMZ or else TMG Servers can also act as adfs proxy servers and will point at the loadbalanced ‘signin.contoso.com‘ vip in the lan. 
  10. Cloudfloor DNS provide GEO dns routing. So for example they can direct traffic from iso country codes to a location of choice. For example us adfs requests can hit us adfs servers. Irish requests can hit Irish adfs servers etc… So a service like this can take care of the external load balancing.
  11. So now we have all this done , time to federate the onpremise domain name ‘contoso.com‘ with our Office365 tenant.
  12. Before we do this we need to ensure we have done the following.
    A: Verify ownership of contoso.com
    B:Activate Active Directory Synchronisation
    C: Download and install the Microsoft Single Sign in Assistant HERE
    D: Once the Single Signin Assistant has been installed , Download and install the Windows Azure Directory Module for Powershell HERE
  13. Now we are ready to run the commands to federate ‘contoso.com‘ with Office365 and we will do so with the following command
    $cred=Get-Credential

    Connect-MsolService –Credential $cred

    Set-MsolAdfscontext -Computer
    adfs.contoso.local  # then enter contoso\adfs credentials
     
    Convert-MsolDomainToFederated –DomainName contoso.com -SupportMultipleDomain
  14. You might have only one domain, But I always recommend using the -SupportMultipleDomain switch as it can future proof your adfs service. For example your customer could acquire a company.
  15. Finally we want to brand our ADFS Proxy pages with company logos and here is a great blog posting by Laurent Bel on how to customise the ADFS 2.0 login page HERE
  16. So now that we have created our first ADFS Server to connect to a SQL Cluster , How do we add more ADFS servers. We do so with the following command as per the original ADFS server setup.

    FSConfig.exe joinSQLFarm /ServiceAccount ‘contoso\adfs‘ /ServiceAccountPassword ‘password‘ /SQLConnectionString “database=AdfsConfigurationServer;server=sqlclus;integrated security=SSPI” 


The term “primary federation server” does not apply when the AD FS configuration database is stored in a SQL database instance because all federation servers can equally read and write to the AD FS configuration database that is using the same clustered SQL Server instance, as shown in the following illustration 

I have not installed ADFS 2.1 on Windows Server 2012 into a SQL Cluster yet but I think it would be the exact same process. I will be doing this on a project coming up shortly and will create a new blog post for this. 

I hope people find this blog posting useful as it took me quite a bit of time to get ADFS right when I first started working with ADFS.

Sean