Tuesday, 28 April 2015

Azure Active Directory Sync Issue…

Working on an Azure Active Directory Sync for a client with multiple forests I came across a strange issue. The first forest was setup with password synchronization for the On-Premises AD accounts, stepped through the wizard and did the initial sync to Azure AD. Once the sync was complete tested login to Office 365 using one of the synced accounts and all worked as expected.

The issue came when adding the second AD connection. Disabled the scheduled task, then open the Microsoft Azure AD Connection Tool to use the wizard to add the second AD forest. Once the new forest was added and synchronization was complete I tested the new logins with Office 365, however this time I was not able to use the accounts that had been synched.

After double checking all settings and making sure I’d not missed anything, I checked the connector using PowerShell:

Get-ADSyncAADPasswordSyncConfiguration –SourceConnector ForestB.Domain.com

This reported back that:

Password hash synchronization isn’t configured for this connector

I checked the original connector

Get-ADSyncAADPasswordSyncConfiguration –SourceConnector ForestA.Domain.com

This reported back:

SourceConnector: ForestA.Domain.com
TargetConnector: Tenant.Onmicrosoft.com
Enabled: True

I ran the PowerShell to add password synchronization to the new connector:

Set-ADSyncAADPasswordSyncConfiguration –SourceConnector ForestB.Domain.com –TargetConnector “tenant.onmicrosoft.com – AAD” –Enable $True

Re-checked the AD Connector, which reported back:

SourceConnector: ForestB.Domain.com
TargetConnector: Tenant.Onmicrosoft.com
Enabled: True

Re-ran the synchronization to Azure AD, once completed tested the same login and all worked.

Note: We plan to add another AD forest to this Azure Active Directory Sync installation, so will update if the issue was with this AD connector or all connectors…

Friday, 6 March 2015

Road to MCSE Messaging complete…

Back in August 2013 I set myself a goal to complete my MCSE Messaging exams, this meant I needed to pass three exams… but in reality it was really six in my opinion.

My exam path was 70-417 (Upgrading Your Skills to MCSA Windows Server 2012), I was able to sit the upgrade as I already had MCITP: Messaging 2010, this is also the reason I believe it was six exams, because 70-417 is three exams in one covering content from 70-410, 70-411 and 70-412. I passed this in April 2014. Passing this exam gave me a MCSA: Server 2012

Next up was 70-341 (Core Solutions of Microsoft Exchange Server 2013), annoyingly it took two attempts, I think I took the first attempt to early and it knocked me for six, and wasn’t looking forward to retaking. However I took again and passed in December 2014.

Last up 70-342 (Advanced Solutions of Microsoft Exchange Server 2013), which I passed yesterday!!! and now have my MCSE: Messaging.

Back in August I said to myself I want to complete this in a year… well six months late, but I still got there, in that time I did have a skiing accident which didn’t help, so was more focused on me than my study, so I going to say I still meet my target ;-)

Here is some of the tools I used during my study

Books:
Server 2012

Installing and Configuring Windows Server 2012 – Link (Now updated for R2)
Inside Out Windows Server 2012 – Link (Now updated for R2)
Exam Ref 70-417 Upgrading from Windows Server 2008 to Windows Server 2012 R2 (MCSA) - Link

Exchange 2013
Inside Out Microsoft Exchange Server 2013: Mailbox and High Availability – Link
Inside Out Microsoft Exchange Server 2013: Connectivity, Clients, and UM – Link
Exam Ref 70-342 Advanced Solutions of Microsoft Exchange Server 2013 (MCSE) – Link
Mastering Microsoft Exchange Server 2013 - Link
Microsoft Exchange Server 2013 High Availability - Link

Videos:
Microsoft Virtual Academy – Link
Channel 9 - Link

Finally a big thanks to friends and colleagues (You know who you are…) that have put up with all my stupid questions during various stages of my study and exams.

I know I’ve just finished but next goal is MCSA: Office 365… where to start…

Friday, 20 February 2015

Deploying Address Book Policies

This blog will cover deploying Address Book Policies (hereafter ABP) in Exchange 2013. This post will cover both from an Admin point-of-view, and a User point-of-view. In my home lab and to help illustrate how the ABP works we’ll take two of world’s favourite cartoon families “The Simpsons” and “the Griffins”.

  

The Basics

Each ABP must contain at least one on the following:
  • Address List (AL)
  • Offline Address Book (OAB)
  • Global Address List (GAL)
  • Room Address List (RAL)

    Plan, Plan, Plan…

    Its important that you plan your deployment of ABP, as there are a number of different elements that can cause the ABP not to function how you envision.

    Address Book Policy Routing agent… (Optional)

    The ABP routing agent allows complete separation of users based on there ABP; From TechNet: - https://technet.microsoft.com/en-us/library/jj657455(v=exchg.150).aspx
    If you’re using ABPs, and you don’t want users in separate virtual organizations to view each other’s potentially private information, you can turn on the Address Book Policy Routing agent. The Address Book Policy Routing agent is a Transport agent that runs on the Mailbox server that controls how recipients are resolved in the organization. When the Address Book Policy Routing Agent is installed and configured, users that are assigned different GALs appear as external recipients in that they can’t view external recipients’ contact cards.

    What this means to the a user, is displayed in the following screenshots:
    Without the routing agent configured

    Using an Outlook client you can see the “Display Name” has resolved when the SMTP has entered, and when you right click and select “Open Outlook Properties” it will display the information from Active Directory. In OWA the experience is a little different

    You can see the SMTP name has resolved to be the “Display Name”  but no additional details are shown in the contact.

    With the routing agent configured

    Using an Outlook client you can see the “Display Name” has not resolved when the SMTP has been entered, and when you right click and select “Open Outlook Properties” it will display the SMTP details. in OWA the experience is a little different

    You can see the SMTP name has not resolved, however the User image still appears.

    NOTE: The OWA experience may just be in my lab environment, I couldn’t get this to change, and will do further troubleshooting and update accordingly.

    How to install the ABP Routing agent

    Run the following commands to install the ABP Routing agent:
    1. Open Exchange Management Shell (EMS) as Administrator
    2. Run the following command to install the agent

      Install-TransportAgent -Name "ABP Routing Agent" -TransportAgentFactory "Microsoft.Exchange.Transport.Agent.AddressBookPolicyRoutingAgent.AddressBookPolicyRoutingAgentFactory" -AssemblyPath $env:ExchangeInstallPath\TransportRoles\agents\AddressBookPolicyRoutingAgent\Microsoft.Exchange.Transport.Agent.AddressBookPolicyRoutingAgent.dll

    3. Run the following command to enable the transport agent

      Enable-TransportAgent "ABP Routing Agent"

    4. The transport service needs to be restarted

      Restart-Service MSExchangeTransport

    5. Run the following command to enable the ABP Routing agent

      Set-TransportConfig -AddressBookPolicyRoutingEnabled $true

    Divide your Organisation

    This is where you separate for Exchange objects into groups, this maybe separate companies, departments, or regions. From TechNet:- https://technet.microsoft.com/en-us/library/jj657455(v=exchg.150).aspx
    You'll need to develop a way to divide your organizations. We recommend using the CustomAttribute1-15 property on the mailboxes, contacts, and groups instead of the pre-canned conditional attributes such as Company, Department, or StateOrProvince to divide the virtual organizations for the following reasons: Not all recipient types of objects have precanned conditional attributes in Active Directory. For example, Distribution Group and Dynamic Distribution Group do not support company, department, or state attributes.
    • Not all precanned conditional attributes are exposed in cmdlets for some recipients. For example, the Company, department, and StateOrProvince parameters are not available on the exposed in cmdlets for mail users, contacts, distribution groups, and mail-enabled public folders.
    • Multiple cmdlets are required to segregate recipient when you use the pre-canned conditional attribute. For example, you need to run Set-User to tag Company, Department, StateOrProvince for a UserMailbox after you run New-Mailbox or Set-Mailbox cmdlets.
    • The CustomAttributeX parameters are all exposed in the Set-* cmdlet for each recipient type, we can complete all segregation for that type via single Set- cmdlet
    • CustomAttributeX attributes are explicitly reserved for customization of an organization and are entirely under the control of the organization administrators.

    Note: From experience and working on a number of different environments I find that “CustomAttribute 1-15” are normally the best fit, however it’s worth noting that these attributes are also commonly used in Email Address Policies, so it’s worth checking if these attributes are not being used for another purpose.

    Create Address Lists, Global Address Lists, and Offline Address Lists

    At the start of the post I said that each ABP requires at least one AL, GAL, OAB, and RAL. Here I find that a good naming convention helps with any design, however I’ll also highlight a couple areas that I find them to be an issue and how to address them.
    For this demonstration I’m keeping it fairly simple and just separating the two groups of users “The Simpsons” and “Family Guy”, for this reason I’ve used the “Company” fields in the following PowerShell, as explained earlier this may not be the best fit. Some of the following processes can be created in the Exchange Admin Console (EAC) I’ll indicate where you can’t use the EAC.

    Address Lists

    I’ve formatted the name of the address list “AL_The Company_Object”, obviously the middle section may change based on separation, this gives me:

    • AL_The Simpsons_All User
    • AL_Family Guy_All Users
    • AL_The Simpsons_All Rooms
    • AL_Family Guy_All Rooms

    To create the these AL’s run the following commands into EMS:

    New-AddressList -Name 'AL_The Simpsons_All Users' -ConditionalCompany @('The Simpsons') -IncludedRecipients 'MailboxUsers'
    New-AddressList -Name 'AL_Family Guy_All Users' -ConditionalCompany @('Family Guy') -IncludedRecipients 'MailboxUsers'
    You will also need a RAL, these are just AL’s with a RecipientType filter applied to the list (This type of filter cannot be applied in the EAC), To create the these AL’s run the following commands into EMS:
    New-AddressList -Name 'AL_The Simpsons_All Rooms' -RecipientFilter {(RecipientDisplayType -eq 'ConferenceRoomMailbox') -and (Company -eq 'The Simpsons')}
    New-AddressList -Name 'AL_Family Guy_All Rooms' -RecipientFilter {(RecipientDisplayType -eq 'ConferenceRoomMailbox') -and (Company -eq 'Family Guy')}
    If you don’t use “Room Mailboxes” in your organisation you can use the default Room AL or create a blank AL that will not be populated with any objects:
    New-AddressList -Name AL_BlankRoom -RecipientFilter {(Alias -ne $null) -and (RecipientDisplayType -eq 'ConferenceRoomMailbox')}

    This creates the necessary AL’s and RAL’s for each ABP; but I would just highlight a functionality point here, this is not a Exchange Admin point, but from the User’s point of view and how I address this. By running the previous commands you get the following the EAC:

    However the user will see the name used during creation of the AL

    This can easily be updated, but this is where the EAC is not always great, the EAC will display the “DisplayName” and not the “Name”, so when you update the lists to be “All Users” etc you get this:

    However EMS gives you this:

    This also however does mean you get happy users ;-)

    Global Address Lists

    I’ve formatted these similar to the AL’s; “GAL_The Company”, obviously you may need to extend based on separation, this gives me:

    • GAL_The Simpsons
    • GAL_Family Guy

    NOTE: New GAL’s cannot be created in the EAC, these need to be created in the EMS:

    New-GlobalAddressList -Name "GAL_The Simpsons" -IncludedRecipients MailboxUsers -ConditionalCompany "The Simpsons"
    New-GlobalAddressList -Name "GAL_Family Guy" -IncludedRecipients MailboxUsers -ConditionalCompany "Family Guy"

     

    Offline Address Books

    The last part before creating the ABP, is to create an OAB; I’ve formatted these the same as the GAL’s; “OAB_The Company”, obviously you may need to extend based on separation, this gives me:

    • GAL_The Simpsons
    • GAL_Family Guy
    NOTE: New OAB’s cannot be created in the EAC, these need to be created in the EMS:

    New-OfflineAddressBook -Name "OAB_The Simpsons" -AddressLists '\AL_The Simpsons_All Users'
    New-OfflineAddressBook -Name "OAB_Family Guy" -AddressLists '\AL_Family Guy_All Users'

     

    Address Book Policies

    The final part is to put all the above together to create an ABP; ABP’s cannot be created in the EAC, these need to be created in the EMS:

    New-AddressBookPolicy -Name "The Simpsons" -GlobalAddressList "\GAL_The Simpsons" -AddressLists '\AL_The Simpsons_All Users' -OfflineAddressBook '\OAB_The Simpsons' -RoomList '\AL_The Simpsons_All Rooms'
    New-AddressBookPolicy -Name "Family Guy" -GlobalAddressList "\GAL_Family Guy" -AddressLists '\AL_Family Guy_All Users' -OfflineAddressBook '\OAB_Family Guy' -RoomList '\AL_Family Guy_All Rooms'

     

    Assign the ABPs to the Mailboxes

    This is where I eat my words about “Plan, Plan, Plan…” throughout this blog I’ve filtered the list based on “Company” however to then apply a ABP to a mailbox with the filter of “Company” you can’t use the Get-Mailbox Cmdlet. You can use another common filter i.e.:

    Get-Mailbox -resultsize unlimited | where {$_.CustomAttribute15 -eq "Family Guy"} | Set-Mailbox -AddressBookPolicy "Family Guy"

    You can of course use the EAC and filter by the company, which will use the Get-Recipent filter, and then apply the ABP to your mailboxes.

    I hope this helps someone in the future and saves them some time.

    Reference Links:

    Address book policies:- https://technet.microsoft.com/en-us/library/hh529948(v=exchg.150).aspx
    Scenario: Deploying address book policies:- https://technet.microsoft.com/en-us/library/jj657455(v=exchg.150).aspx
    Address book policy procedures:- https://technet.microsoft.com/en-us/library/hh529916(v=exchg.150).aspx 

    Disclaimer: All scripts and other PowerShell references on this blog are offered "as is" with no warranty.  While these scripts are tested and working in my test environment, it is recommended that you test these scripts in your own test environment before using in any production environment.

    Thursday, 4 December 2014

    Exam 70-341 - Core Solutions of Microsoft Exchange Server 2013

    I passed exam 70-341 today, second time of trying so glad to get this out of the way.

    Next up is 70-342 Advanced Solutions of Microsoft Exchange Server 2013 for my MCSE Messaging...

    Wednesday, 26 November 2014

    On-Premises Legacy Public Folder

    There are some new recommendations around Legacy Public Folder configuration in Exchange 2013. These settings were introduced in Exchange 2013 Cumulative Update (CU) 5.

    The recommendation is to make these configuration changes prior to installing CU7 (When it's released…), the recommendation may impact your update depending on legacy version of Exchange see flow diagram below.

    Quick guide steps are:
    • Legacy Version of Exchange
      • If Exchange 2007
        • Add new Mailbox Database on same server as Public Folder Database
      • If Exchange 2010
        • Ensure server hosting Public Folder database has the Client Access Role installed
        • Add new Mailbox Database on same server as Public Folder Database
    • Create a new "Proxy Mailbox" on the database created
    • Update Exchange 2013 configuration
      • Set-OrganizationConfig -PublicFoldersEnabled Remote
      • Set-OrganizationConfig -RemotePublicFolderMailboxes "ProxyMailbox1","ProxyMailbox2","ProxyMailbox3"
    Source:-
    http://blogs.technet.com/b/exchange/archive/2014/11/07/on-premises-legacy-public-folder-coexistence-for-exchange-2013-cumulative-update-7-and-beyond.aspx
    http://technet.microsoft.com/en-us/library/dn249373(v=exchg.150).aspx 

     
     

    Disclaimer: All scripts and other PowerShell references on this blog are offered "as is" with no warranty.  While these scripts are tested and working in my test environment, it is recommended that you test these scripts in your own test environment before using in any production environment.

    Sunday, 16 November 2014

    Exchange 2013 Upgrade in a Child Domain

    Recently working on an Exchange 2013 upgrade project where the forest had both a Root and Child domain, I came across a couple of points that I thought would be worth noting for future reference.

    On Exchange projects you make the necessary Request for Change (RFC), to enable the upgrade of the Active Directory (AD) Forest and Domains, and the installation of Exchange 2013. Sometimes I come across where the client wants to prepare the AD Forest and Domains separate from the Exchange installation, to allow for the schema upgrade to replicate. In these scenarios you find that the groups "Schema Admins", "Enterprise Admins" and "Domain Admins" are more tightly controlled (As they should be…) not to allow inappropriate or temporary accounts in these groups just for installation.

    The necessary Exchange binary files and commands for the Schema and Domain extension were passed to the AD team.

    • Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
    • Setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms
    • Setup.exe /PrepareAllDomains /IAcceptExchangeServerLicenseTerms
    Note: /PrepareAllDomains was used due to there being a root and child domain

    These commands prepared the Schema and Domains for Exchange 2013 installation, as these commands were run by another team and wasn't visible to myself I double checked the Schema objects.

    $RootDSE = ([ADSI]"").distinguishedName
    $ForestRangeUpper =
    ([ADSI]"LDAP://CN=ms-Exch-Schema-Version-Pt,CN=Schema,CN=Configuration,$RootDSE").rangeUpper
    $ForestObjectVersion = ([ADSI]"LDAP://cn=<ExhangeOrg>,cn=Microsoft Exchange,cn=Services,cn=Configuration,$RootDSE").objectVersion
    $DomainObjectVersion = ([ADSI]"LDAP://CN=Microsoft Exchange System Objects,$RootDSE").objectVersion
    $DisplayVersions = @()

    $DisplayVersions +=
    "Exchange Forest (rangeUpper) = " + "$ForestRangeUpper"
    $DisplayVersions
    += "Exchange Forest (ObjectVersion) = "
    + "$ForestObjectVersion"
    $DisplayVersions
    += "Domain (ObjectVersion) = "
    + "$DomainObjectVersion"
    $DisplayVersions

    Note:
    You need to add the "Exchange Organisation" name on the '$ForestObjectVersion' line, this will return three numbers on the Root Domain and only the '$DomainObjectVersion' on the Child Domain.

    Forest:










    Child Domain:











    Exchange 2013 Schema and Domain Versions:
    ExchangeForest (rangeUpper)Forest (objectVersion)Domain (objectVersion)
    2013 RTM151371544913236
    2013 CU1152541561413236
    2013 CU2152811568813236
    2013 CU3152831576313236
    2013 SP1152921584413236
    2013 CU5153001587013236
    2013 CU6153031596513236

    This confirmed the Schema and Domains had successfully been prepared. The next stage was to install the first Exchange 2013 server into the infrastructure, I misinterpreted the requirements to install the first Exchange 2013 server…

    From TechNet (Exchange 2013): - http://technet.microsoft.com/en-us/library/bb124778(v=exchg.150).aspx
    • You must ensure the account you use is delegated membership in the Schema Admins group if you haven't previously prepared the Active Directory schema. If you're installing the first Exchange 2013 server in the organization, the account you use must have membership in the Enterprise Admins group. If you've already prepared the schema and aren't installing the first Exchange 2013 server in the organization, the account you use must be a member of the Exchange 2013 Organization Management role group.

    From TechNet (Exchange 2010):- http://technet.microsoft.com/en-us/library/bb124778(v=exchg.141).aspx
    • If you're installing the first Exchange 2010 server in the organization, and the Active Directory preparation steps have not been performed, the account you use must have membership in the Enterprise Administrators group. If you haven't previously prepared the Active Directory schema, the account must also be a member of the Schema Admins group. For more information about preparing Active Directory for Exchange 2010, see Prepare Active Directory and Domains. If you have already performed the schema and Active Directory preparation steps, the account you use must be a member of the Delegated Setup management role group or the Organization Management role group.

    I was a member of the Child Domains "Domain Admins" and a member of "Organization Management" and stated to install the first Exchange 2013 server, strangely enough as much as the setup process has improved over the years and warning when a step or prerequisite has been missed, or not in the correct groups etc. The setup did not pick up that I wasn't a member of "Enterprise Admin" and that this was the first Exchange 2013 server being installed. If this was Exchange 2010 installation all would have be ok, but as this was an Exchange 2013 installation there is the extra requirement of "If you're installing the first Exchange 2013 server in the organization, the account you use must have membership in the Enterprise Admins group". Needless to say the Exchange 2013 installed failed at (Step 8 I think) the reason being I was not a member of "Enterprise Admins".

    My account was added to the "Enterprise Admins" group and setup was rerun to complete the installation of the server.

    Exchange RBAC Groups and Arbitration Mailboxes… 
     






















    Just to finish a quick note about the Roll Based Access Control groups (RBAC), these groups are used to help manage Exchange. In a Root and Child Domain deployment, these groups will be in the Root Domain in the AD forest. The Arbitration and Discovery mailboxes will also be in the Root domain even if the Exchange servers are only installed in the child domain. As discovered when I wanted to move these too highly available mailbox. When I ran the follow command:
    • Get-Mailbox –Arbitration  







    The Exchange Management Shell (EMS) returns no mailboxes??? We all know they are there, so why are they not showing in the EMS? The reason is by default is the EMS session will have an AD scope set to the domain you're logged into. To change the AD scope run the follow command:
    • Set-ADServerSettings –ViewEntireForest:$true  







    And then retry the previous command again:
    • Get-Mailbox –Arbitration















    I hope this helps someone in the future and saves them some time.

    Disclaimer: All scripts and other PowerShell references on this blog are offered "as is" with no warranty.  While these scripts are tested and working in my test environment, it is recommended that you test these scripts in your own test environment before using in any production environment.

    Friday, 3 October 2014

    Exchange High Availability with Kemp Load Balancer…

    Working recently on an Exchange 2010 deployment I was doing end to end testing with the environment before it went into pilot phase, all was working well till I failed one of the server nodes in the DAG, I noticed the Outlook client would freeze… The Kemp VLM was downloaded from the website, and I'd used the Exchange 2010 ESP template. So what was wrong?

    What was wrong was I didn't follow the deployment guide like I'd previously done when I didn't use the Exchange template, the template had made me lazy as it does all the hard work for you. But there are some basic settings that need to be changed on the load balancer so that the load balancer will function correctly.

    In my case I hadn't change "Drop Connections on Real Server Failure", this is a very quick change on the Web User Interface (WUI), from the Kemp deployment guide:

    By default existing connections are not closed if a Real Server fails. This can lead to issues with Outlook clients if an Exchange CAS server fails. A solution to this is to enable the Drop Connections on RS Failure option which can be found on the System Configuration > Miscellaneous > L7 Configuration screen in the WUI.

    When this option is enabled, LoadMaster tracks all the incoming connections and which Real Servers they are connected to. When a Real Server fails, all connections to the Real Server are immediately dropped, forcing the connections to reconnect to a different Real Server.

    Enabling this option has the added benefit of allowing relatively higher Idle Connection Timeout values to be set as the danger of the client retaining a connection to a failed server is removed.


























    Figure 1: L7 Configuration

    So always make sure that you read the deployment guide and apply the settings required even if the templates do all the hard work for you…

    Kemp Exchange 2010 Deployment Guide - https://support.kemptechnologies.com/hc/en-us/articles/201737917-Exchange-2010