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:

- <a href="/.attachments/Install-HaloOutlookBanner.ps1" download>Install-HaloOutlookBanner.ps1</a>
- <a href="/.attachments/Invoke-HaloOutlookBannerSynchronization.ps1" download>Invoke-HaloOutlookBannerSynchronization.ps1</a>
- <a href="/.attachments/Remove-DistroGroupMember.ps1" download>Remove-DistroGroupMember.ps1</a>

## Prerequisites
- Have your Exchange Online authentication details ready — either a username/email (for interactive login) or a PFX certificate
- Install the `ExchangeOnlineManagement` module 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 "admin@contoso.onmicrosoft.com"`

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 `-NoAuth` if needed, with: `-HaloToken` (bearer token) **or** `-HaloCredential` (basic auth)

:::