Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

CREATE USER IN AZURE USING WINDOW

POWERSHELL

Step 1. Open Window PowerShell Run as Administrator

Step 2. Install Azure module


Install-Module -Name Az -RequiredVersion 7.1.0

Step 3. Connect Azure Account


Connect-AzAccount -UseDeviceAuthentication

Open provided URL and enter the code then Select the Azure account and Sign in.
Step 4. Connect AzureAD
Connect-AzureAD

Then login azure account using credentials.

Step 5. Configure Password Profile


$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile

Step 6. Add Parameters


$params = @{
AccountEnabled = $true
DisplayName = "User2"
PasswordProfile = @{
Password = "Harshu@123"
}
UserPrincipalName = "user2@urshhr7760gmail.onmicrosoft.com"
MailNickName = "TestUser"
}
New-AzADUser @params.
 Here UserPrincipalName is yours display name and followed by your domain name.
 MailNickName is optional
 We already created password profile so now we have to create password
 AccountEnabled it indicates whether the user’s account is enabled.

Step 7. To view the user


get-azaduser
CREATE GROUPS IN AZURE USING WINDOW
POWERSHELL

Step 1. Open Window PowerShell Run as Administrator

Step 2. Connect Azure Account


Connect-AzAccount -UseDeviceAuthentication

Open provided URL and enter the code then Select the Azure account and Sign in.
Step 3. Connect AzureAD
Connect-AzureAD

Then login azure account using credentials.


Step 4.

1. Create Security Group

New-AzADGroup -DisplayName "MyGroup1" -MailNickname "MyGroup1" -Description "This is


security group"
2. Create Microsoft 365 Groups
New-AzADGroup -DisplayName "MyGroup2" -MailNickname "MyGroup2" -Description "This is
microsoft 365 group" -GroupType "Unified"

Step 5. To View the groups


Get-AzADGroup
CREATE USER IN AZURE USING AZURE PORTAL

Step 1. Login to Azure Portal

Step 2. Search Azure AD in that Click on Users and Create New-User


Step 3. Created the User Harshitha

CREATE GROUPS IN AZURE USING AZURE PORTAL

Step 1. In Azure Active Directory click on Groups add new groups


Step 2. Click on Group Type, Select Security
Step 3. Created the Group with Security Group Type

Step 4. Create Group with Microsoft 365

Step 5. Created Group with Microsoft 365 Group

You might also like