This Azure tutorial will discuss the syntax and usage of the Get-AzureADDirectorySettingTemplate PowerShell command with examples.
Table of Contents
Get-Azure ADDirectory Setting Template
This Azure PowerShell command can get you a directory setting template.
Syntax of Get-AzureADDirectorySettingTemplate
Below is the syntax of the Get-AzureADDirectorySettingTemplate PowerShell command.
Get-AzureADDirectorySettingTemplate
or
Get-AzureADDirectorySettingTemplate -Id <String>
Example
Execute the below PowerShell command Get-AzureADDirectorySettingTemplate to get the list of all settings templates.
PS C:windowssystem32> Get-AzureADDirectorySettingTemplateBut after executing the command I got the below error
Get-AzureADDirectorySettingTemplate : The term ‘Get-AzureADDirectorySettingTemplate’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- Get-AzureADDirectorySettingTemplate
~~~~~~~- CategoryInfo : ObjectNotFound: (Get-AzureADDirectorySettingTemplate:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
You can see the same error I got in the screenshot below with the PowerShell command I executed.

To fix this error, I followed the below steps:
1. Open the Windows PowerShell or PowerShell ISE app as an administrator.
2. Uninstall your previous versions of AzureAD or AzureADPreview. Use the below command in your Windows PowerShell or PowerShell ISE window.
PS C:windowssystem32> Uninstall-Module AzureADPreview
PS C:windowssystem32> Uninstall-Module azuread
3. Now install the latest version of AzureADPreview. Use the below command in your Windows PowerShell or PowerShell ISE window.
PS C:windowssystem32> Install-Module AzureADPreview
4. Now, the below popup will appear. Click on the Yes button.

5. You can see below it started installing the AzureADPreview module.

6. Once the AzureADPreview module is successfully installed, you can again run the below command Get-AzureADDirectorySettingTemplate to get the list of all settings templates. This time, it will work for you without any issues.
PS C:windowssystem32> Get-AzureADDirectorySettingTemplate
You may like the following Azure tutorials:
- How to create and add members to Azure Active Directory Group
- The term ‘get-azureadgroup’ is not recognized as the name of a cmdlet
Conclusion
In this Azure tutorial, we discussed the syntax and usage of the Get-AzureADDirectorySettingTemplate PowerShell command with examples and how to fix the error get-azureaddirectorysetting not recognized that I got while executing the Get-AzureADDirectorySettingTemplate PowerShell command.
I am Bijay, a Microsoft MVP (10 times) having more than 17 years of experience in the software industry. During my IT career, I got a chance to share my expertise in SharePoint and Microsoft Azure, like Azure VM, Azure Active Directory, Azure PowerShell, etc. I hope you will learn from these Azure tutorials. Read more
