Update-MgBookingBusiness

What is Update-MgBookingBusiness?

Update-MgBookingBusiness is a Microsoft Graph PowerShell cmdlet used to modify existing Microsoft Bookings businesses. It allows administrators to update properties such as business hours, contact information, address details, and other configuration settings without recreating the booking business.

🚀 Community Edition Released!

Try the M365Corner Microsoft 365 Reporting Tool — your DIY pack with 20+ out-of-the-box M365 reports for Users, Groups, and Teams.

Why Use Update-MgBookingBusiness?

This cmdlet is ideal for automation and centralized management of Microsoft Bookings. Instead of manually editing each booking business through the Bookings UI, administrators can script updates, apply consistent changes across multiple businesses, and perform bulk updates using CSV files. This is especially useful for large organizations managing multiple service locations.


Prerequisites

Before using Update-MgBookingBusiness, ensure the following:

  • Microsoft Graph PowerShell module is installed
    Install-Module Microsoft.Graph -Scope CurrentUser
  • You are connected to Microsoft Graph with appropriate permissions
    Connect-MgGraph -Scopes "Bookings.ReadWrite.All"

How to use Update-MgBookingBusiness?

The cmdlet works by passing the BookingBusinessId of the target business and a hashtable containing only the properties you want to update. This allows partial updates without affecting other existing settings.

Basic syntax:

Update-MgBookingBusiness -BookingBusinessId <String> -BodyParameter <Hashtable>

Update-MgBookingBusiness Examples

  • Example 1: Update Single Business Property (Business Hours)
  • This example modifies only the business hours of a booking business.

    $businessId = "12345678-90ab-cdef-1234-567890abcdef"
    $bodyParam = @{
        BusinessHours = @(
            @{
                Day = "Monday"
                StartTime = "08:00:00"
                EndTime = "18:00:00"
            },
            @{
                Day = "Tuesday"
                StartTime = "08:00:00"
                EndTime = "18:00:00"
            }
        )
    }
    
    Update-MgBookingBusiness -BookingBusinessId $businessId -BodyParameter $bodyParam
    Write-Host "Business hours updated successfully."
                                                
  • Example 2: Update Multiple Properties (Contact Information)
  • This example updates the email address and phone number for a booking business.

    $businessId = "12345678-90ab-cdef-1234-567890abcdef"
    $bodyParam = @{
        Email = "contact@business.com"
        Phone = "+1 555-123-4567"
    }
    Update-MgBookingBusiness -BookingBusinessId $businessId -BodyParameter $bodyParam
    Write-Host "Contact information and time zone updated successfully."
                                                
  • Example 3: Bulk Update Using a CSV File
  • Using a CSV file, this example bulk-updates multiple booking businesses with different configurations.

    CSV file format:

    BookingBusinessId,Email,Phone
    12345678-90ab-cdef-1234-567890abcdef,contact1@business.com,+1 555-111-2222
    abcd1234-ef56-7890-abcd-1234567890ef,contact2@business.com,+1 555-333-4444
                                                

    PowerShell script:

    $csvData = Import-Csv -Path "Businesses.csv"
    foreach ($business in $csvData) {
        $bodyParam = @{
            Email = $business.Email
            Phone = $business.Phone
        }
        Update-MgBookingBusiness -BookingBusinessId $business.BookingBusinessId -BodyParameter $bodyParam
        Write-Host "Updated booking business with ID: $($business.BookingBusinessId)"
    }
                                                

Summary

Key Point Details
Cmdlet Name Update-MgBookingBusiness
Purpose Updates properties of an existing Microsoft Bookings business
Required Scope Bookings.ReadWrite.All
Primary Parameters BookingBusinessId, BodyParameter
Automation Benefit Enables scripted and bulk updates to booking businesses
Common Use Case Updating business hours, contact details, or mass configuration changes

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