Share via

Room Mailboxes

Rising Flight 6,456 Reputation points
2022-04-01T19:44:36.77+00:00

Hi All

i am using exchange 2016 hybrid environment. i create room mailboxes using the below command.

New-RemoteMailbox -Name $DisplayName -Alias $.Alias -OnPremisesOrganizationalUnit 'contoso.com/Room Mailboxes' -UserPrincipalName $UPN -FirstName $.FN -LastName $_.LN -Room

what is the proper way to delete the room mailboxes. i basically delete the object from Active Directory is this the right approach. i have100 room mailboxes in the csv file in the below format and i need to delete from exchange as well as from AD. experts guide me.

Names
room1@Company portal .com
room2@Company portal .com

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management

The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.

0 comments No comments

Answer accepted by question author

Andy David - MVP 160.3K Reputation points MVP Volunteer Moderator
2022-04-01T19:52:35.483+00:00

If the goal is to remove the object completely, then yes, delete from AD and it will be removed from Exchange as well.

$Rooms = import-csv rooms.csv  
$Rooms | % {Remove-RemoteMailbox -Identity $_.Names}  

Test with a few first, before running against the entire list

https://learn.microsoft.com/en-us/powershell/module/exchange/remove-remotemailbox?view=exchange-ps

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rising Flight 6,456 Reputation points
    2022-04-01T20:03:25.517+00:00

    since i am using remote mailbox i believe i should use the below syntax in exchange onprem.

     $Rooms = import-csv rooms.csv
     $Rooms | % {Remove-RemoteMailbox -Identity $_.Names}
    

    Was this answer helpful?


Your answer

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