In this Azure PowerShell article, we will discuss the syntax and usage of the New-AzADUser PowerShell command with certain examples.
Table of Contents
New-AzADUser
This PowerShell command can help you to create a new Azure AD user.
Syntax
Below is the syntax of the New-AzADUser PowerShell command.
New-AzADUser
-DisplayName <String>
-MailNickname <String>
-UserPrincipalName <String>
-Password <SecureString>
New-AzADUser
-DisplayName <String>
-MailNickname <String>
-UserPrincipalName <String> -PasswordProfile <IMicrosoftGraphPasswordProfile>
Let’s discuss an example of how to use the New-AzADUser PowerShell command.
Example
You can execute the below PowerShell command to create a new Azure AD user with a Password.
$mynickname = "AzureLessonsUser"
$myuname = "AzureLessons User"
$upname = "AzureLessonsUser@fewlines4bijuhotmail.onmicrosoft.com"
$mypswd = "XXXXX@XXX"
$mypswd = ConvertTo-SecureString -AsPlainText -Force $mypswd
New-AzADUser -DisplayName $myuname -Password $mypswd -AccountEnabled $true -MailNickname $mynickname -UserPrincipalName $upname
After executing the above PowerShell command, I got the below-expected output and the Azure AD user has been created successfully.
DisplayName Id Mail UserPrincipalName
----------- -- ---- -----------------
AzureLessons User c2df0bca-215e-4144-bfd1-807be7ddf81d AzureLessonsUser@fewlines4bijuhotmail.onmicrosoft.com
You can see the same output in the below screenshot.

Conclusion
In this Azure PowerShell article, we discussed we will discuss the syntax and usage of the New-AzADUser PowerShell command with certain examples. Thanks for reading this article !!!

I am Rajkishore, and I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machine, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.