assistanz
Assistanz

Steps to Remove Azure Active Directory Users and Groups

Steps to Remove Azure Active Directory Users and Groups

Steps to Remove Azure Active Directory Users and Groups

In this blog, We will show you the Steps to Remove Azure Active Directory Users and Groups using Windows PowerShell.

 

REQUIREMENTS

  • Microsoft Azure Subscriptions
  • Windows VM

 

OVERVIEW

  • We have already installed Active Directory Domain named azdomain.local and created three users for the demo purpose.

Steps to Remove Azure Active Directory Users and Groups

 

  • Also, we have synchronized the local Active Directory users with Azure AD.

Steps to Remove Azure Active Directory Users and Groups

 

  • We can not delete the AD users from the Azure portal. Delete user option will be greyed out.

Steps to Remove Azure Active Directory Users and Groups

 

EXPORTING AZURE AD USERS AND GROUPS

  • Open the PowerShell window and connect to the Azure Active Directory using Global administrator account using below command.
connect-msolservice

Steps to Remove Azure Active Directory Users and Groups

 

  • Provide the global admin ID from the pop-up screen and click Next.

Steps to Remove Azure Active Directory Users and Groups

 

  • Enter the Password and click Sign in.

Steps to Remove Azure Active Directory Users and Groups

 

  • After successful login, export the Azure AD user into a CSV file using the below command.
Get-MsolUser –All | Export-CSV C:\ADusers.csv

Steps to Remove Azure Active Directory Users and Groups

 

  • The file ADusers.csv will be available on C: drive.

Steps to Remove Azure Active Directory Users and Groups

 

  • Export the Azure AD Groups into a CSV file using the below command.
Get-MsolGroup –All | Export-CSV C:\ADGroups.csv

Steps to Remove Azure Active Directory Users and Groups

 

  • Open the ADusers.csv and remove the Global administrator account from the list.

Steps to Remove Azure Active Directory Users and Groups

 

  • Save and close the CSV file.

 

DELETE THE AD USERS AND GROUPS

  • From the PowerShell window, execute the below command to delete the AD users.
Import-CSV C:\ADusers.csv | Remove-MsOlUser –Force

Steps to Remove Azure Active Directory Users and Groups

 

  • Run the below command to delete the AD Groups.
Import-CSV C:\ADGroups.csv | Remove-MsOlGroup –Force

image

 

VERIFICATION

  • Open the Azure portal, and click on the Active Directory users and groups link.

Steps to Remove Azure Active Directory Users and Groups

 

  • Click on All users Link. Only the Global administrator account is available on the list.

Steps to Remove Azure Active Directory Users and Groups

 

  • There is no groups are available on the list.

Steps to Remove Azure Active Directory Users and Groups

 

VIDEO

Thanks for reading this blog. We hope it was useful for you to know the steps to delete the Azure Active Directory users using Powershell command.

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support