Search This Blog

Friday 5 June 2020

Azure power shell ISE

Open power shell ISE form your computer as administrator for Azure


 


Install azure Active directory in your computer,

Create new script in powershell and type below command and run the script

install-module -name azuread

install completed


If there is any error you can use below command

install-module -name azuread -force

Verify azure AD module installed or not using below command:

get-module azuread

Connect to Azure Active Directory, type below command and run:

Connect-azuread, you will get pop up to enter your azure credential to login

Now logged to powershell successfully

 

 


 


Get all Azure users, using below command:

get-azureaduser

 

create user “steve” using powersheel:

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

 

$PasswordProfile.Password = "Enter@2020"

 

New-AzureADUser -DisplayName "steve" -PasswordProfile $PasswordProfile -UserPrincipalName "steve@yourazure.onmicrosoft.com" -AccountEnabled $true -MailNickName "steveford"

 

Go to azure portal and check sure created or not:

 




No comments:

Post a Comment