Bulk disable exchange mailboxes

Gurudas 926 Reputation points
2023-02-14T09:35:53.78+00:00

Hello Team, Hope you are doing great! Please help me with a PowerShell command to disable bulk mailboxes and create mail enabled users with the same User principle name UPN which we make as a disable mailbox.

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,448 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,825 questions
{count} votes

Accepted answer
  1. Aholic Liang-MSFT 13,871 Reputation points Microsoft External Staff
    2023-02-15T09:27:44.73+00:00

    Hi,

    You could refer to the following command to disable mailbox and enable mail user:

    import-csv disable.csv | foreach{Disable-Mailbox -identity $_.identityEnable-Mailuser -identity $_.identity -ExternalEmailAddress $_.externalemailaddress}
    
    

    2023-2-15-1


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.