Commands › Exchange Online
Get-TenantAllowBlockListItems
View entries in the Tenant Allow/Block List in the Microsoft Defender portal.
Quick start script
# Get-TenantAllowBlockListItems — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Run and inspect
Get-TenantAllowBlockListItems -ListType <ListType> -NoExpiration <SwitchParameter> | Format-List
# 3. Export for evidence / drift tracking
Get-TenantAllowBlockListItems | Export-Clixml .\TenantAllowBlockListItems-$(Get-Date -Format yyyyMMdd).xml
Syntax — 2 parameter sets
Expiration (Default)
Get-TenantAllowBlockListItems -ListType <ListType> [-ExpirationDate <DateTime>]
[-Allow]
[-Block]
[-Entry <String>]
[-ListSubType <ListSubType[]>]
[-OutputJson]
[<CommonParameters>]
NoExpiration
Get-TenantAllowBlockListItems -ListType <ListType> [-NoExpiration]
[-Allow]
[-Block]
[-Entry <String>]
[-ListSubType <ListSubType[]>]
[-OutputJson]
[<CommonParameters>]
Parameters (8)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.