[TUTO] – Azure AD : How to remove a user in Azure Active Directory

1
7
1 Star2 Stars3 Stars4 Stars5 Stars (Aucun Vote)
Loading...

We will see in this tutorial how to remove a user from your domain Azure Active Dirctory in Powershell.

Before anything, you will need the module MSOL and its Powershell commands to be able to connect to the Azure Active Directory domain and act on items in this area. I will probably return to the installation of the module in a next tutorial, in the meantime feel, free to follow the documentation from Microsoft here https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps-2.0.

 

Start a Powershell console and then enter the following command to connect:

A connection prompt appears and simply use a local account “onmicrosoft.com”, or a verified domain account to connect. Of course, the account must have the necessary rights to connect.

 

Once connected, to remove a user, enter the following command using its “User Principal Name”.

 

If by chance you are wrong on the command and delete a bad user, don’t worry, the command you just learn does not permanently remove user but put it in the Recycle Bin Azure AD for 30 days before being completely removed.

We will see together in a next tutorial, how to recover a deleted user or how to permanently delete a user without waiting for the deadline of 30 days.

Jérémy Lebon

Co-Fondateur de sys-Advisor.com, Ingénieur de production Informatique dans l’e-commerce mais passionné avant tout, je partage mon quotidien à travers ce site. #sysadmin #microsoft #vmware #tech #geek @sysadvisor

Contact Skype Enterprise : jeremy.lebon@sys-advisor.com

LAISSER UN COMMENTAIRE

Please enter your comment!
Please enter your name here