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]
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]
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

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.
  • 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.