Closed DrIOSX closed 1 month ago
Base PowerShell Audit:
Get-SharingPolicy | Where-Object { $_.Domains -like '*CalendarSharing*' }
Audit Mailboxes prior to disabling the feature globally:
$mailboxes = Get-Mailbox -ResultSize Unlimited
foreach ($mailbox in $mailboxes) {
# Get the name of the default calendar folder (depends on the mailbox's language)
$calendarFolder = string.Name
# Get users calendar folder settings for their default Calendar folder
# calendar has the format identity:\<calendar folder name>
$calendar = Get-MailboxCalendarFolder -Identity "$($mailbox.PrimarySmtpAddress):\$calendarFolder"
if ($calendar.PublishEnabled) {
Write-Host -ForegroundColor Yellow "Calendar publishing is enabled for $($mailbox.PrimarySmtpAddress) on $($calendar.PublishedCalendarUrl)"
}
}
Validation for Test-ExternalSharingCalendars.ps1
Recommendation Details
Test-ExternalSharingCalendars.ps1
Tasks
Validate recommendation details
Validate test for a pass
OrganizationConfig
propertyExternalSharingEnabled
is set toFalse
.Validate test for a fail
OrganizationConfig
propertyExternalSharingEnabled
is set toTrue
.Add notes and observations
If needed, the helpers folder in .\source\helpers contains a CSV to assist with locating the test definition.