Although you can use the Azure management portal to produce users in Azure Active Directory (AAD), there are instances when you just want to generate a service account with no getting to log out and in as that new user to set a password. The excellent news is that PowerShell makes it possible for you to rapidly do just that. The poor news is that there is a tiny bit of setup operate necessary.
Creating AD Users Utilizing the GUI
It is fairly simple to produce a new user in the management portal: browse into Active Directory, the directory of selection, Users, and then click Add User. That method is pretty simple if you are setting up access rights to Azure for an additional user. But what if you want to generate lots of users? Employing the GUI will be slow.
One particular of the downsides of using the GUI is that the user is produced with a temporary password and the user must log in to set a new password. That is a bit inconvenient if you just want to set up a service account.
The answer to these concerns is … you guessed it … PowerShell.
There are a quantity of requirements that you need to place in spot in order to be in a position to create customers in Azure Active Directory employing PowerShell.
- Download and install the Microsoft On the internet Solutions Sign-In Assistant for IT Experts RTW on your Computer.
- You’ll also want to download and set up the Azure Active Directory Module for Windows PowerShell (64-bit version) on your Pc.
- Use a native Azure Active Directory administrator account to get rights in your AAD directory. A Microsoft Account will not operate.
Creating the User
Open up the Windows Azure Active Directory for Windows PowerShell console and then run the following cmdlets to sign into your Azure Active Directory. Provide the name and password of your AAD native administrator user account – bear in mind that this need to not be a Microsoft Account.
$ msolcred = Get-Credential Connect-MsolService -Credential $ msolcred
You now can generate a new user. The following instance will generate a user with a permanent password that does not need to be changed according to the password policy of the domain:
New-MsolUser -UserPrincipalName [email protected] -DisplayName “RemoteApp2″ -FirstName “Remote” -LastName “App2″ -Password Password00 -PasswordNeverExpires $ correct -AlternateEmailAddresses [email protected]
The new account is set up as a normal user account. This may be fine for bulk addition of user accounts in your AAD domain, but that won’t be adequate for a service account. You might need to add the user to a group or function in the domain, such as International Admin (a part). The following example will configure the new user as a International Admin, which is a role named Company Administrators:
Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberEmailAddress [email protected]
Now you have the signifies to speedily create new customers in Azure Active Directory.
The post Develop Azure Active Directory Customers Using PowerShell appeared first on Petri.