Exchange Online PowerShell 模組中的篩選

Exchange Online PowerShell 模組包含九個專屬的 Get-EXO* Cmdlet,這些 Cmdlet 已針對高速、大量作業進行優化,並在您連線到組織之後 () 可讓您存取服務中的數百個現有 Cmdlet。 如需詳細資訊,請參閱Exchange Online PowerShell 模組中的 Cmdlet

若要充分利用課程模組中九個獨佔 Get-EXO* Cmdlet 中的篩選準則,您必須遵循本文中的指引。

提示

版本 3.0.0 和更新版本 (2022) 稱為 Exchange Online PowerShell V3 模組 (縮寫為 EXO V3 模組) 。 2021 (2.0.5 版和更早版本) 稱為 Exchange Online PowerShell V2 模組, (縮寫為 EXO V2 模組) 。

使用用戶端篩選以獲得最佳效能

伺服器端篩選會在指令程式上使用可用的篩選器收件者篩選器 參數。

用戶端篩選會使用 Where-Object 指令程式 (亦稱為 哪裡 or ?)。

一般而言,透過伺服器端篩選,Exchange PowerShell Cmdlet 的效能會更佳。 不過,針對 Exchange Online PowerShell 模組,您實際上會在使用用戶端篩選時獲得更好的效能。 我們正在努力改善模組中伺服器端篩選的效能。

不支援的可篩選屬性

模組中的 Get-EXO* Cmdlet 支援其較舊對等 Cmdlet 中可用的大部分 可篩選屬性 。 但是,目前有一些屬性無法與 Get-EXO* Cmdlet 中的篩選搭配使用。 下表將說明這些屬性:

指令程式 不支援的可篩選屬性 LDAP Display Name
Get-EXOCASMailbox MemberOfGroup

ExternalDirectoryObjectId
memberOf

msExchExternalDirectoryObjectId
Get-EXOMailbox DeletedItemFlags

LanguagesRaw

MasterAccountSid

MemberOfGroup

RequireAllSendersAreAuthenticated

SCLDeleteThresholdInt

SCLJunkThresholdInt

SCLQuarantineThresholdInt

SCLRejectThresholdInt

deletedItemFlags

msExchUserCulture

msExchMasterAccountSid

memberOf

msExchRequireAuthToSendTo

msExchMessageHygieneSCLDeleteThreshold

msExchMessageHygieneSCLJunkThreshold

msExchMessageHygieneSCLQuarantineThreshold

msExchMessageHygieneSCLRejectThreshold

Get-EXORecipient CountryCode

ExternalDirectoryObjectId

MasterAccountSid

MemberOfGroup

成員

countryCode

msExchExternalDirectoryObjectId

msExchMasterAccountSid

memberOf

成員

支援的運算子

下列運算子完全支援 Exchange Online PowerShell 模組中Get-EXO* Cmdlet 中的所有字串格式:

-like-notlike 運算子的使用方式不受萬用字元(*)限制。 具體說來,您只能在字串值(或字串值的結尾,或兩者)的開頭使用萬用字元。

例如,系統不支援下列文字搜尋:

"UPN -like 'A*B*C'

不過,系統支援下列搜尋:

"UPN -like 'A*' -and UPN -like '*C' -and UPN like '*B*'"