Skip to content

Get-AzureADDirectorySettingTemplate : The term ‘Get-AzureADDirectorySettingTemplate’ is not recognized.

Get-AzureADDirectorySettingTemplate : The term ‘Get-AzureADDirectorySettingTemplate’ is not recognized.

You receive the following error when trying to execute the following cmdlet: Get-AzureADDirectorySettingTemplate.

To resolve this error, you need to install the following PowerShell Module AzureADPreview.

But you will find that users have installed the PowerShell Module AzureAD and this Module does not have the cmdlets for Get-AzureADDirectorySetting.

To get this error resolve, you need to uninstall the AzureAD PowerShell Module by following the below.

To remove the incorrect module run the following.

Uninstall-Module -Name AzureAD

Once the removal is done, run the following to install the new PowerShell Module.

Install-Module -Name AzureADPreview

Next, we can verify that we have the latest version of the PowerShell Module installed.

Connect-AzureAD

As we can see the version of the PowerShell cmdlets is on the latest version.

Now let’s try again and run the cmdlet, Get-AzureADDirectorySettingTemplate

As we can see by removing the old PowerShell AzureAD Module, the PowerShell cmdlet is now available.

ThatLazyAdmin

Sharing is caring!

Published inAzure Active DirectoryExchange OnlineOffice 365PowerShell

2 Comments

  1. Aditya Aditya

    Hi LazyAdmin,

    The solution is not working for me.
    I uninstalled and installed again but same error.

    What do you recommend?

    Thanks,

    • Hi Aditiya,

      Try and run the following to get a list of the Current Installed AzureAD PSH.
      Get-Module -Name AzureAD and Get-Module -Name AzureADPreview

      you might find that you dont have any of these Modules installed, run the below to install these modules on your machine.

      Install-Module -Name AzureAD

      Then

      Update-Module -Name AzureAD

Leave a Reply

Your email address will not be published. Required fields are marked *