Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New scripts to help manage mailbox extended property quota issues #2227

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

cboonham
Copy link
Contributor

Issue:
Mailboxes can hit extended property (nee named properties) quota issue, due to apps registering too many extended properties.

Reason:
These scripts help diagnose if there is an extended properties quota issue and help to address the issue by searching for a removing the unwanted extended properties.

Fix:
New scripts and documentation.

Validation:
Tested in own tenant.

@cboonham cboonham requested a review from a team as a code owner November 21, 2024 14:24
Copy link
Member

@dpaulson45 dpaulson45 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review of the scripts, make those changes and will come back and go in deeper into it.

M365/Check-MailboxExtendedProperty.ps1 Outdated Show resolved Hide resolved
M365/Check-MailboxExtendedProperty.ps1 Outdated Show resolved Hide resolved
M365/Remove-MailboxExtendedProperty.ps1 Show resolved Hide resolved
M365/Search-MailboxExtendedProperty.ps1 Show resolved Hide resolved
@dpaulson45
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dpaulson45
Copy link
Member

Pipeline failed due to spell check:

image

Must use camelCase or PascalCase

@cboonham
Copy link
Contributor Author

cboonham commented Nov 22, 2024

Spellings corrected

@cboonham cboonham closed this Nov 22, 2024
@cboonham cboonham reopened this Nov 22, 2024
@dpaulson45
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dpaulson45
Copy link
Member

Code formatting currently failing with the build process:

image

Run the CodeFormatter.ps1 in the .build directory

@dpaulson45
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dpaulson45
Copy link
Member

@lusassl-msft will review and test tomorrow

Comment on lines +4 to +6
#Requires -Modules @{ ModuleName="ExchangeOnlineManagement"; RequiredVersion="3.4.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Users"; RequiredVersion="2.24.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Mail"; RequiredVersion="2.24.0" }
Copy link
Contributor

@lusassl-msft lusassl-msft Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cboonham do we require exactly these versions or is this the minimum version that is required? If it's the minimum version, it would be better to use ModuleVersion instead as this specifies a minimum acceptable version of the module whereas RequiredVersion specifies an exact, required version of the module.

# Get the current Microsoft Graph context
$context = Get-MgContext
if ($null -eq $context) {
Write-Host -ForegroundColor Red "No valid context. Please connect to Microsoft Graph first."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to write out a log file? You can use the shared GenericScriptStartLogging.ps1 helper functions to write Write-Host and Write-Verbose out to a log file. This would be helpful in case of troubleshooting issues with the script.

)

process {
# Get the current Microsoft Graph context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add the shared GenericScriptUpdate.ps1 helper functions to the script. This will add auto-update capabilities in case that we release a newer version of the script.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't think the scripts are going to have a lot of repeat traffic, we might not need to have the update script feature. @cboonham I would leave that up to your discretion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants