Enabling the Outlook email banner via PowerShell
If you prefer to manage the Outlook email banner externally rather than granting Glasswall Halo access to Exchange Online, PowerShell scripts are provided for standalone use:
- Install-HaloOutlookBanner.ps1
- Invoke-HaloOutlookBannerSynchronization.ps1
- Remove-DistroGroupMember.ps1
Prerequisites
- Have your Exchange Online authentication details ready — either a username/email (for interactive login) or a PFX certificate
- Install the
ExchangeOnlineManagementmodule if it is not already present (the scripts will install it automatically if missing)
Step 1 — Install the Outlook banner
Run Install-HaloOutlookBanner.ps1 to create the Distribution Group and Transport Rule.
Authenticating with Exchange Online
- Using interactive browser login (recommended)
powershell .\Install-HaloOutlookBanner.ps1 -UserPrincipalName "[email protected]"
OR
- Using a PFX certificate
powershell .\Install-HaloOutlookBanner.ps1 -ExchangeCertificatePath "C:\path\to\certificate.pfx" -ExchangeAppId "your-azure-app-id" -ExchangeOrganization "contoso.onmicrosoft.com"
Step 2 — Synchronize the distribution group with Halo monitors
Transport rules are cached
[!Note]: the Transport Rule will cache the Distribution Group, which expires after 4 hours. It could take up to 4 hours for changes to take effect.
Run Invoke-HaloOutlookBannerSynchronization.ps1 whenever monitor changes are made, to keep the Distribution Group in sync.
Authenticating with Exchange Online
- Using interactive browser login (recommended)
powershell .\Invoke-HaloOutlookBannerSynchronization.ps1 -HaloUri "<halo-url>" -NoAuth -UserPrincipalName "<email-address>"
OR
- Using a PFX certificate
powershell .\Invoke-HaloOutlookBannerSynchronization.ps1 -HaloUri "https://your-halo-instance.com" -NoAuth -ExchangeCertificatePath "C:\path\to\certificate.pfx" -ExchangeAppId "your-azure-app-id" -ExchangeOrganization "contoso.onmicrosoft.com"
[!TIP] Replace
-NoAuthif needed, with:-HaloToken(bearer token) OR-HaloCredential(basic auth)