The Remove-MgBookingBusiness cmdlet is used to delete a Microsoft Bookings business entity from a Microsoft 365 tenant. When a business is no longer needed—such as a closed department or retired service—this cmdlet permanently removes its associated booking data from the tenant.
Administrators use this cmdlet to:
By using this cmdlet, you can efficiently maintain tenant hygiene without manually navigating through the Microsoft 365 admin or Bookings interface.
Before executing this cmdlet, ensure that:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Bookings.ReadWrite.All"
To remove a Booking Business, use the -BookingBusinessId parameter to specify the unique ID (usually the business email address) of the Booking Business you want to delete.
Remove-MgBookingBusiness -BookingBusinessId <String>
To remove a single Booking Business, provide the BookingBusinessId as shown below.
Remove-MgBookingBusiness -BookingBusinessId "ContosoENTClinic@7xh7fj.onmicrosoft.com"
This command permanently deletes the Contoso ENT Clinic Booking Business from Microsoft 365.
You can remove multiple Booking Businesses by iterating through an array of IDs.
$businessIds = @("ContosoDentalClinic@7xh7fj.onmicrosoft.com", "ContosoOrthoClinic@7xh7fj.onmicrosoft.com")
foreach ($id in $businessIds) {
Remove-MgBookingBusiness -BookingBusinessId $id
}
This approach is useful for bulk cleanup tasks, ensuring that all outdated or unused booking pages are deleted in one run.
For large organizations, removing multiple Booking Businesses using a CSV file is the most efficient method.
CSV File Format:
BookingBusinessId
ContosoDentalClinic@7xh7fj.onmicrosoft.com
ContosoENTClinic@7xh7fj.onmicrosoft.com
ContosoOrthoClinic@7xh7fj.onmicrosoft.com
PowerShell Script:
$csvFile = "C:\path\to\bookingbusinesses.csv"
$businesses = Import-Csv -Path $csvFile
foreach ($business in $businesses) {
Remove-MgBookingBusiness -BookingBusinessId $business.BookingBusinessId
}
This script imports the list of BookingBusinessId values from a CSV file and deletes each Booking Business in a loop.
It’s particularly beneficial for scheduled maintenance tasks or tenant-wide cleanups.
This approach streamlines bulk Booking Business creation for enterprises managing multiple departments or regional offices.
| Key Point | Details |
|---|---|
| Cmdlet Name | Remove-MgBookingBusiness |
| Purpose | Deletes a Microsoft Bookings business entity from Microsoft 365 |
| Required Scope | Bookings.ReadWrite.All |
| Primary Parameter | BookingBusinessId |
| Automation Benefit | Enables automated cleanup of unused or outdated Booking Businesses |
| Use Case | Tenant maintenance, offboarding, or batch deletion of Bookings data |
Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.
Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.
© Your Site Name. All Rights Reserved. Design by HTML Codex