KnowledgeBase: You can’t use the AzureADKerberos PowerShell Module on Azure AD Connect installations in a custom installation location

Reading Time: 2 minutes

Azure AD Connect

During the installation of Azure AD Connect, you can select the option to use an alternative location. In this case, the Microsoft Azure AD Sync folder is stored in the alternative location, but the Microsoft Azure AD Connect folder isn’t.

The situation

When you work with Hybrid Cloud Trust, you need the AzureAdKerberos PowerShell module. This module is located in the C:\Program Files\Microsoft Azure AD Connect\AzureADKerberos folder.

You import the PowerShell module using the following line of Windows PowerShell:

Import-module "C:\Program Files\Microsoft Azure Active Directory Connect\AzureADKerberos\AzureAdKerberos.psd1"

The issue

You experience an error and the module isn’t imported.

The cause

You experience this issue when you’ve selected the option to use an alternative location when you installed Azure AD Connect.

This option is provided during installation. On the Install required components page of the Azure Active Directory Synchronization Configuration Wizard admins have the option to Specify a custom installation location. However, this option merely moves the Microsoft Azure AD Sync folder, not other Azure AD Connect folders…

AzureADKerberos.psd1 expects its *.dll files to be in the C:\Program Files\Microsoft Azure AD Sync folder. Within the file, the location for the four *.dll files is designated as ..\..\ in the file:

AzureADKerberos.psd1 contents

The solution

Change the four locations in the AzureADKerberos.psd1 file to point to the the custom installation location. Save the file. Then import it without errors.

leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.