Created
February 28, 2025 19:52
-
-
Save bill-long/52a0bfdda49f5690ff46e41b2e820202 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get-NamedProperties | |
# | |
# Example: | |
# .\Get-NamedProperties.ps1 -Mailbox user1 | ft Prop* | |
[CmdletBinding()] | |
param ( | |
[Parameter()] | |
[string] | |
$Mailbox | |
) | |
$mb = Get-Mailbox $Mailbox | |
. $exscripts\ManagedStoreDiagnosticFunctions.ps1 | |
$mbTableResult = Get-StoreQuery -Database "$($mb.Database.ToString())" -Query "SELECT MailboxNumber FROM Mailbox WHERE MailboxGuid = '$($mb.ExchangeGuid.ToString())'" | |
Write-Host "Found mailbox $($mb.DisplayName) with mailbox number $($mbTableResult.MailboxNumber)." | |
$mailboxNumber = $mbTableResult.MailboxNumber | |
Get-StoreQuery -Database "$($mb.Database.ToString())" -Query "SELECT * FROM ExtendedPropertyNameMapping WHERE MailboxNumber = $mailboxNumber" |
Author
bill-long
commented
Feb 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment