Skip to main content

Calendar helpers

Requires an EXO session. For full and always-up-to-date details, use Get-Help <FunctionName> -Detailed (or -Examples).

Copy-OoOMessage

Clone automatic reply (out-of-office) settings from one mailbox to another.

Syntax

Copy-OoOMessage -SourceMailbox <String> -DestinationMailbox <String> [-ForceEnable] [-PassThru]
ParameterDescriptionRequired
SourceMailbox (Identity)Mailbox to read auto-reply configuration from. Pipeline accepted.Yes
DestinationMailboxMailbox to apply the configuration to.Yes
ForceEnableEnable auto-replies immediately on the destination, ignoring source state/schedule.No
PassThruEmit the updated destination configuration.No

Example

Copy-OoOMessage -SourceMailbox source@contoso.com -DestinationMailbox dest@contoso.com -ForceEnable -PassThru

Export-CalendarPermission

Export calendar permissions for one or more mailboxes to CSV (and optionally to the pipeline).

Syntax

Export-CalendarPermission [-SourceMailbox <String[]>] [-SourceDomain <String[]>]
[-OutputFolder <String>] [-All] [-PassThru]
ParameterDescriptionRequired
SourceMailbox (Identity)Mailboxes to analyze. Pipeline accepted.No
SourceDomainDomain filter (includes all matching mailboxes).No
OutputFolderDestination folder for the CSV report. Defaults to current directory.No
AllAnalyze every mailbox (CSV is written).No
PassThruEmit the collected permission objects as well as CSV path.No

Examples

Export-CalendarPermission -SourceMailbox info@contoso.com -OutputFolder C:\Temp
Export-CalendarPermission -SourceDomain contoso.com -OutputFolder C:\Temp -PassThru
Export-CalendarPermission -All -OutputFolder C:\Temp
note
  • CSV is saved as yyyyMMdd_M365-CalendarPermissions-Report.csv using module-configured delimiter/encoding.
  • Permissions AvailabilityOnly and None are excluded.
  • If no mailbox/domain is specified and -All is not set, the cmdlet scans the entire tenant.

Get-RoomDetails

List room list members with capacity and location details.

Syntax

Get-RoomDetails [-City <String[]>] [-Csv] [-OutputFolder <String>] [-GridView] [-PassThru]
ParameterDescriptionRequired
CityFilter room lists whose name/display name matches the provided text.No
CsvExport results to CSV.No
OutputFolderDestination for CSV; defaults to current directory.No
GridViewShow results in Out-GridView.No
PassThruEmit room detail objects (also when exporting).No

Examples

Get-RoomDetails
Get-RoomDetails -City Milan -Csv -OutputFolder C:\Temp
Get-RoomDetails -GridView

Set-OoO

Enable, schedule, or disable automatic replies on a mailbox.

Syntax

Set-OoO -SourceMailbox <String> [-InternalMessage <String>] [-ExternalMessage <String>]
[-ExternalAudience <None|Known|All>]
[-StartTime <DateTime>] [-EndTime <DateTime>] [-ChooseDayFromCalendar]
[-Disable] [-PassThru]
ParameterDescriptionRequired
SourceMailbox (Identity)Mailbox to configure. Pipeline accepted.Yes
InternalMessageMessage for internal recipients. Defaults to current config/template.No
ExternalMessageMessage for external recipients. Defaults to internal message.No
ExternalAudienceExternal scope: None, Known, or All.No
StartTime / EndTimeSchedule window (both required together).No
ChooseDayFromCalendarPick start/end dates via popups (mutually exclusive with Start/End).No
DisableTurn off automatic replies.No
PassThruEmit the updated configuration.No

Examples

# Enable immediately
Set-OoO -SourceMailbox user@contoso.com -InternalMessage "<p>Back soon</p>" -ExternalAudience All
# Schedule via parameters
Set-OoO -SourceMailbox user@contoso.com -StartTime "2025-12-27 08:00" -EndTime "2025-12-30 18:00"
# Schedule via calendar popups
Set-OoO -SourceMailbox user@contoso.com -ChooseDayFromCalendar
# Disable
Set-OoO -SourceMailbox user@contoso.com -Disable
note
  • Do not combine -ChooseDayFromCalendar with -StartTime/-EndTime.
  • Messages accept HTML; defaults are reused from the current configuration when omitted.