Example only: This repository is not an official Microsoft product or service. It does not provision a tenant, establish licensing, grant access, or certify production readiness. Every deployment requires independently approved inputs, current entitlement evidence, least-privilege access, and change authorization.
Supported scope
The active workflow evaluates a versioned Exchange-only profile for a Worldwide tenant. It uses Microsoft-managed Standard and Strict preset security policies without copying or modifying their individual settings.
Standard preset for the approved broad recipient population
Strict preset for an approved priority-user group
Exchange Online hardening and evidence collection
Fail-closed input, entitlement, approval, and evidence contracts
Protection profiles
Standard
Microsoft's recommended baseline profile for broad recipient coverage.
Strict
A more aggressive Microsoft-managed profile for selected high-value targets or priority users.
Automated Investigation and Response, Threat Explorer, and Attack Simulation Training are separate Microsoft Defender for Office 365 Plan 2 capabilities. Assigning Strict does not enable them.
What this repository does not claim
It does not reproduce Microsoft-managed preset values in local templates.
It does not provide a generic detect-only mode for Standard or Strict presets.
It does not infer entitlement from a suite name or declare that capabilities have no additional licensing cost.
It does not certify DNS, identity, licensing, client, Purview, or other externally owned readiness.
It does not validate sovereign-cloud or hybrid deployment paths.
Configuration files
One versioned Exchange-only configuration; Standard and Strict are recipient-targeted Microsoft presets, not separate script downloads.
Standard and Strict are Microsoft-managed preset policies. This repository does not ship different scripts for them; administrators initialize the presets in the Microsoft Defender portal and manage the supported recipient scope. Virtually all individual settings in these presets are Microsoft-managed and cannot be customized. Custom policies do not override an applicable Standard or Strict preset because presets have higher precedence.
Guided Exchange change wizard
Start with the prerequisites and support boundary. When those fit your situation, continue to the ordered steps. Progress stays in this browser tab: your current step and scope and preset choices survive a refresh, but typed domains and addresses are not saved. The microsite does not save tenant data, connect to your tenant, or execute scripts.
Confirm this is the right path. This guided change is for an already provisioned Worldwide Exchange Online tenant. It does not build a tenant, create users or groups, initialize preset policies, grant access, establish licensing, or replace independent change approval.
For a net-new environment, first follow the net-new Exchange administrator journey; foundational work has separate owner handoffs and approval requirements.
Runtime and access
PowerShell 7.5 or later
ExchangeOnlineManagement 3.10.0 or later
Worldwide tenant (O365Default)
Approved Exchange identity with least-privilege access
Protected input and artifact locations outside source control
Use the exact module version approved for the change. Preset policies can be managed through applicable Defender Unified RBAC permissions or Exchange Online Organization Management or Security Administrator role groups. Global Administrator is highly privileged; prefer narrower supported roles.
Recovery
Rollback restores only reviewed settings whose current state still matches the approved change. It cannot undo delivered or processed messages. Follow the approved-change runbook; do not recreate Microsoft-managed preset policies from exported data.
Who is involved (line these people up before you start)
Every change needs two people. The scripts enforce this: Validate and Apply refuse an approval signed by the requester or by anyone not in the authorized signer file. This is the change's separation-of-duties control, not optional paperwork.
Role
Who
What they do
What they need
You (requester and operator)
The Exchange admin running this walkthrough
Steps 1–5, then 7 and 8: prepare, check, preview, apply, collect evidence
Least-privilege Exchange role, the kit, the protected folder
Approver
A different person whose name is in the authorized signer file
Step 6 only, about 10 minutes: reviews your preview and signs it. Needs no Exchange connection or admin role.
PowerShell 7, the same kit, read/write access to your protected folder, and their enterprise signing certificate (with private key) whose subject matches the signer file
Approval authority owner
Usually change management or security; not you
Before Step 3: gives you the path to the protected authorized signer file. Keeps it out of your control.
—
Before Step 1: know who your approver is, confirm they are in the signer file and have their certificate, and agree a time. The preview you send them expires 24 hours after Step 5, so they must sign within that window.
Support boundary
The active journey is limited to Worldwide tenants and has not validated sovereign-cloud or hybrid endpoints, authentication, licensing, or feature behavior.
Step 1 of 8: Get the change kit and open PowerShell 7
Step 1 · Get the kit
Get the change kit and open PowerShell 7
Everything after this step runs in one PowerShell 7 terminal, from the expanded kit folder. Keep that terminal open until Step 8.
1a. Open PowerShell 7
Open Start, PowerShell 7 (or Windows Terminal, then run pwsh). Do not use “Windows PowerShell” 5.1. If PowerShell 7 is missing, install it first:
Any FAIL line prints the exact command that fixes it on the line below. Run that command, then rerun the check.
Stop if: the hash check prints False, or a FAIL remains after you run its fix.
Step 2 · Choose
Choose what this change will touch
Answer three questions. Each answer builds the exact values you paste in Step 3, and the commands in Steps 4 and 5 update to match. Record the same choices in your change ticket; the scope is frozen into the preview and cannot be widened later.
1. Which areas does your ticket approve?
Tick only the scopes your approved ticket names. New to the workflow? Start with Transport alone. Badges tell you what each scope needs.
Your scope
Select at least one scope above.
2. Who gets Standard and who gets Strict?
Not needed for the scopes you selected. This only applies to EopPresets or AtpPresets.
Standard and Strict are Microsoft-managed preset policies. Everyone in your primary domain gets Standard. Members of one mail-enabled security group get Strict instead. The group is always required, even if it is empty.
What to do
Paste into your parameter file in Step 3
3. Which extra settings does your ticket include?
None needed for the scopes you selected. Your parameter file does not need a workflowOptions section.
Some scopes need a workflowOptions section that names exactly what to change. Required sections are already ticked. Tick an optional one only if your ticket asks for it.
What to do
Paste into your parameter file in Step 3, then replace every REPLACE- value
Stop if: there is no approved ticket, the ticket's scope is unclear, or the work needs a new tenant, new users or groups, or first-time preset activation. Use the net-new Exchange administrator journey for that work.
Create a protected folder outside the kit and outside any Git repository, then copy the sample parameter file into it. The sample is synthetic and is refused until you replace its values.
Stop if: an owner has not supplied their value, the licensing handoff is missing or expired, or you are the only authorized signer. Never fill in a value just to get past a check.
Run the full readiness check with your values from Step 3. You do not need to connect first. The script checks the ExchangeOnlineManagement module, reuses an existing session, or signs you in (MFA prompts appear in your browser). It then shows the account and tenant and asks you to confirm them. The check is read-only. It confirms the workstation, files, inputs, licensing, signer list, the session tenant, your role's cmdlets, and preset initialization.
No browser on this machine? Add -UseDeviceCode and enter the code on another device.
Wrong account shown? Answer N, run Disconnect-ExchangeOnline, and rerun with the right -UserPrincipalName.
Unattended run? Add -ConfirmSession:$false to skip the account prompt. Use it only after you've checked the session.
Preview, Apply, and Rollback do the same sign-in check. Approve and Validate run offline and never sign in.
Sample output: a failed check and its fix
2. Change inputs (offline)
[FAIL] Licensing entitlement verified - ExchangeEntitlementUnverified: supply a current tenant- and recipient-bound licensing owner handoff (RAID-D02).
Ask the licensing owner for a current handoff; they set entitlement.verified, servicePlans, and a future expiresOn. Never set verified yourself.
NOT READY: 1 of 18 checks failed. Fix each item above, then rerun this script.
Sample output: ready, with your next commands
3. Exchange Online session (read-only)
[PASS] Exactly one Exchange Online session - 1 connected session(s)
[PASS] Session tenant matches parameters - session 6c1f9a2e-… as admin@contoso.onmicrosoft.com
[PASS] Worldwide endpoint - https://outlook.office365.com/...
[PASS] Role grants Get-TransportConfig for Transport
READY FOR PREVIEW: 18 checks passed.
Copy these lines into this same terminal to create the preview:
$change = @{
ParameterPath = 'D:\ExchangeChanges\contoso.parameters.json'
ConfigurationPath = './config/exchange-only.v1.json'
ArtifactRoot = 'D:\ExchangeChanges\CHG-1001'
ChangeId = 'CHG-1001'
RequestedBy = 'requester@contoso.com'
AuthorizedSignerPath = 'D:\ExchangeChanges\authorized-signers.json'
PreviewPath = 'D:\ExchangeChanges\CHG-1001\preview-CHG-1001.json'
ApprovalPath = 'D:\ExchangeChanges\CHG-1001\approval-CHG-1001.json'
}
./scripts/Invoke-ExchangeOnlineChange.ps1 -Stage Preview @change -Scope 'Transport' -Confirm:$false
Stop if: any line says FAIL after you apply its fix, especially the session tenant, licensing, or preset checks. For first-time preset activation, use the net-new preset guidance.
Paste the $change block and the Preview command that the readiness check printed. Preview reads the tenant and records every exact before-and-after value. It changes nothing. It is valid for 24 hours.
Check each operation: the command, the object it targets, and the before and after values.
Hand off to your approver
When the preview matches your ticket, copy a handoff note to the clipboard and send it to your approver (chat, email, or the ticket). It contains the $change block they paste, the preview fingerprint they compare, and the expiry time:
$previewHash = (Get-FileHash -LiteralPath $change.PreviewPath -Algorithm SHA256).Hash
$changeBlock = '$change = @{' + [Environment]::NewLine + (($change.GetEnumerator() | Sort-Object Key | ForEach-Object { " $($_.Key) = '$(([string]$_.Value).Replace("'", "''"))'" }) -join [Environment]::NewLine) + [Environment]::NewLine + '}'
@(
"Please review and sign Exchange change $($change.ChangeId) (requested by $($change.RequestedBy))."
"Preview SHA-256: $($previewHash)"
"Preview expires: $($preview.ExpiresOn) - please sign before then."
'In PowerShell 7, from the kit folder, paste this block, then follow Step 6a of the guided wizard:'
$changeBlock
) -join [Environment]::NewLine | Set-Clipboard
Then wait. You continue with Step 6b after the approver tells you they have signed.
Stop if: the tenant, target, or value differs from your ticket. Do not edit the preview file. Fix the input, use a new change ID, and rerun Steps 4 and 5.
This is the approver you lined up before Step 1 (see Who is involved). You sent them the handoff note at the end of Step 5. Step 6a is done by the approver on their own computer; you wait, then do 6b.
6a. Approver (not you): check, review, then sign
If you are the approver: open PowerShell 7 in the kit folder (Step 1 of this wizard, if you don't have the kit), paste the $change block from the handoff note, and confirm the preview is the one the requester sent. The hash must match the note exactly:
Review the operations with the Step 5 review commands. If they match the ticket, sign with your enterprise certificate. You do not need an Exchange connection or admin role:
To find your thumbprint, run Get-ChildItem Cert:\CurrentUser\My | Select-Object Subject, Thumbprint, NotAfter and pick the certificate whose subject matches your entry in the signer file. Signing writes approval-<ChangeId>.json into the shared folder. Tell the requester you have signed.
Approver, do not sign if: the hash differs from the note, an operation does not match the ticket, or you are the person who requested the change.
6b. You (requester): validate the approval
After the approver says they have signed, go back to your own terminal and confirm the signature, signer, certificate trust, and preview binding:
Stop if: the approver is the requester, Validate reports a signature or trust error, the approval expired, or any file changed after signing. Never edit approval JSON by hand.
Use your approved change window. First rehearse: -WhatIf confirms your session, checks the approval and current state, and lists the operations, but changes nothing and writes no files. Then apply.
Answer Y at the confirmation prompt only after checking the tenant and change ID it shows. Apply writes prechange, apply, postchange, and rollback files to the artifact folder.
This is a production change. The microsite cannot run it. If apply refuses because the tenant changed since the preview, do not retry with edited files. Start a new change ID from Step 4.
Stop if: the rehearsal fails, the prompt shows the wrong tenant or change, or apply reports drift.
Collect evidence, assess outcome, and retain recovery artifacts
Collect evidence with the same inputs. The collector reuses your existing session after it shows the signed-in account and confirms the tenant, so evidence is never read from the wrong tenant. Then build the Markdown report for the ticket:
The second command reads every change artifact and the evidence file, then writes evidence-report-<ChangeId>.md into the artifact folder. It does not connect to the tenant. It reports INCOMPLETE if any artifact belongs to a different change or the evidence was collected for another tenant, configuration, or before apply. Expected output:
INCOMPLETE means an artifact is missing or apply did not succeed. The report lists what is missing and what to do next.
APPLIED - CONTROLS NEED ATTENTION means some checks failed or errored. Each one is listed with its reason; assign an owner.
The report and evidence are not a go-live approval and do not turn unverified readiness into Pass.
Attach the report and keep the whole artifact folder (preview, approval, apply, postchange, rollback, evidence) with the ticket.
When done, run Disconnect-ExchangeOnline -Confirm:$false.
Only if your recovery decision calls for rollback
Rollback restores only the settings this change touched, and only if they have not changed since apply. It works within the 24-hour approval window and cannot undo delivered or processed messages.
The content tests reject legacy scripts, obsolete schemas, detect-only preset claims, and other unsupported concepts.
Evidence contract
Live collection must use the same configuration, parameters, entitlement handoff, recipient matrix, manifest, and approval that governed the change. Pass, NotEntitled, ApprovedException, Fail, and Error remain distinct. Externally owned readiness remains unverified until its accountable owner supplies admissible evidence.
Frequently asked questions
Does preview create a detect-only mail-flow mode?
No. The supported plan and approved preview describe proposed administrative changes. Standard and Strict presets enforce their documented actions when assigned. Microsoft Defender evaluation is a separate feature and is not configured by this workflow.
Can I tune Standard or Strict thresholds?
No. Virtually all individual preset settings are Microsoft-managed. Manage supported recipient scope and exclusions instead. A custom policy does not override an applicable Strict or Standard preset.
Does Strict include AIR?
No. Strict is a Microsoft-managed protection profile. AIR and other advanced investigation capabilities are separate Plan 2 features and require applicable tenant and recipient entitlement.
Are all capabilities included at no extra cost?
No general cost claim can be made. Required licensing depends on the capability and every recipient who benefits from it. Verify current tenant service plans and recipient assignments; do not infer entitlement from a suite display name.
How should false positives be handled?
Submit legitimate messages, URLs, or attachments to Microsoft first. When Microsoft filtering caused the block, the service can create the applicable temporary allow entry. Entity type controls behavior and expiration. Broad or permanent sender allows must not replace authentication fixes, correct scope, or verdict review.
The active configuration prohibits permanent allow entries and requires owner, ticket, timestamps, expiry, and justification for governed entries.
Does this workflow support GCC High or DoD?
No validated support is claimed. The active administrator journey is Worldwide-only. Sovereign and hybrid environments require a separately reviewed and tested journey.