Below is the command to delete Both Exchange mailbox and Active Directory Account with the single commant from the given list of users in the text file.
Get-content “C:\Powershell\Users.txt” | Remove-Mailbox
Below command will the get list of users in the disabled state and modified date is older then 10 days and deletes the same
Get-Mailbox -ResultSize unlimited |?{$_.useraccountcontrol -match “AccountDisabled, NormalAccount”} |?{$_.WhenChanged -lt (get-date).AddDays(-10)} |Remove-Mailbox