Skip to main content

Calendar helpers

Requires an EXO session. For full details and examples, run Get-Help <FunctionName> -Detailed (or -Examples). CSV export commands in this section finish with a success message that includes the generated CSV path, and they do not echo the path as a second pipeline line.

Copy-OoOMessage

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

Syntax

Copy-OoOMessage -SourceMailbox <String> -DestinationMailbox <String> [-ForceEnable] [-PassThru]
ParameterTypeDescriptionRequiredDefault
SourceMailbox (Identity)StringMailbox to read auto-reply configuration from. Pipeline accepted.Yes-
DestinationMailboxStringMailbox to apply the configuration to.Yes-
ForceEnableSwitchEnable auto-replies immediately on the destination, ignoring source state/schedule.NoFalse
PassThruSwitchEmit the updated destination configuration.NoFalse

Example

Copy-OoOMessage -SourceMailbox user1@contoso.com -DestinationMailbox user2@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]
[-BatchSize <Int32>] [-Resume] [-CsvPath <String>] [-MaxConsecutiveErrors <Int32>]
ParameterTypeDescriptionRequiredDefault
SourceMailbox (Identity)String[]Mailboxes to analyze. Pipeline accepted.NoNone (All mailboxes if no scope is provided)
SourceDomainString[]Domain filter (includes all matching mailboxes).NoNone (All mailboxes if no scope is provided)
OutputFolderStringDestination folder for the CSV report. Defaults to current directory.NoCurrent directory
AllSwitchAnalyze every mailbox (CSV is written).NoFalse
PassThruSwitchEmit the collected permission objects as well as CSV path.NoFalse
BatchSizeInt32Number of processed mailboxes to buffer before flushing the CSV.No25
ResumeSwitchResume from the latest matching CSV or from -CsvPath.NoFalse
CsvPathStringExplicit CSV file to resume. When omitted, the latest matching CSV is used.No-
MaxConsecutiveErrorsInt32Stop after this many consecutive mailbox-level failures.No5

Examples

Export-CalendarPermission -SourceMailbox user@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.
  • Resume skips rows already present in the selected CSV and defaults to the latest matching report in the output folder.
  • CSV exports include MailboxIdentity so resume can match the rows more reliably.
  • 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]
ParameterTypeDescriptionRequiredDefault
CityString[]Filter room lists whose name/display name matches the provided text.NoNo filter (all room lists)
CsvSwitchExport results to CSV.NoFalse
OutputFolderStringDestination for CSV; defaults to current directory.NoCurrent directory
GridViewSwitchShow results in Out-GridView.NoFalse
PassThruSwitchEmit room detail objects (also when exporting).NoFalse

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]
ParameterTypeDescriptionRequiredDefault
SourceMailbox (Identity)StringMailbox to configure. Pipeline accepted.Yes-
InternalMessageStringMessage for internal recipients. Defaults to current config/template.NoCurrent config/template
ExternalMessageStringMessage for external recipients. Defaults to internal message.NoInternalMessage
ExternalAudienceString (None/Known/All)External scope: None, Known, or All.NoAll
StartTime / EndTimeDateTimeSchedule window (both required together).No-
ChooseDayFromCalendarSwitchPick start/end dates via popups (mutually exclusive with Start/End).NoFalse
DisableSwitchTurn off automatic replies.NoFalse
PassThruSwitchEmit the updated configuration.NoFalse

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
warning
  • Do not combine -ChooseDayFromCalendar with -StartTime/-EndTime.
  • Messages accept HTML; defaults are reused from the current configuration when omitted.