I’m new to PowerShell and Office 365 management, so I hope someone can assist me with what I believe is a rather simple task. I have migrated a couple clients to Office 365 and in both instances, needed to delete multiple users. I ended up using the gui to remove the accounts, but that is an issue if the accounts are not all listed on the same page. You need to select users, delete and then move to the next page. I have the steps I would like to complete listed below.
Export all user to a csv file and include their first name, last name and UPN. (knowing how to do this, I should be able to add other fields as needed in the future)
Using the exported csv file, I will edit it to only include the accounts I want to delete.
Run a PowerShell command that will import the csv and delete the accounts in the file.
Thanks for any help!