r/PowerShell • u/Suspicious_Rest4713 • 11d ago
Script Sharing HybridScope – a WPF GUI that merges AD + Exchange on-prem + Microsoft 365 into one RVTools-style inventory (read-only, PS 5.1)
EDIT – v1.7.0 is out: HybridScope now also reads Microsoft Defender (Business Premium / Defender for Business): per user and PC, vulnerabilities, missing KBs, software to update and a prioritized fix list. Plus an MFA fix. Details in the comments / release notes.
I'm a sysadmin in a hybrid environment (Exchange 2019 + AD + Microsoft 365) and every time someone asked "how many mailboxes are still on-prem, how big are they, who has MFA, which licenses are wasted?" I ended up exporting three CSVs from three consoles and merging them in Excel by hand.
So I built HybridScope: one window, three sources, one merged view per user.
What it does
- Pulls users from Active Directory, mailboxes from Exchange on-prem (
Get-Mailbox,Get-MailboxStatistics,Get-RemoteMailbox) and licenses / sign-ins / OneDrive / MFA from Microsoft Graph - Tells you where each mailbox really lives (
ON-PREM/365/NO MAILBOX) based on Exchange and GraphprovisionedPlans, not on mailbox size - Real MFA status: registered methods, default method, legacy per-user state
- RVTools-style tabs: Overview per OU, Users, Mailboxes on-prem / 365, OneDrive, MFA, Tenant licenses, an "Attention" list (on-prem mailboxes to migrate, licensed users without MFA, licenses on disabled accounts, inactive accounts)
- 5 infrastructure modes with one click: Full Cloud / Full Hybrid / Hybrid (365 + AD) / On-Prem (Exchange + AD) / AD only
- Export to formatted XLSX (ImportExcel) or CSV, all tabs or just the filtered current tab
-Autoswitch for scheduled reports with certificate auth + history tracking- English / Italian UI
Some implementation details you might find interesting
- Windows PowerShell 5.1, single
.ps1, WPF built from XAML - All the heavy lifting runs in a persistent background runspace, so the UI never freezes; log lines come back through a
ConcurrentQueuepolled by aDispatcherTimer. There's a Stop button (BeginStop()on the running pipeline) - Only
Microsoft.Graph.Authenticationis needed: everything goes throughInvoke-MgGraphRequestwith manual paging, no giant SDK install - Exchange via implicit remoting (
Import-PSSession, Kerberos), works from non-domain-joined PCs with explicit credentials - Read-only: it never writes anything to AD, Exchange or the tenant
Repo: https://github.com/Thonno/hybridscope (MIT)
HybridScope - Active Directory, Exchange and Microsoft 365 user report (PowerShell)
Screenshots are in the README (sensitive data blurred).
Full disclosure: I wrote it with a lot of help from an AI assistant and tested it on our own environment, so I'm sure there are edge cases I haven't hit yet. Feedback, issues and PRs are very welcome, especially from people with different setups (multiple Exchange orgs, big tenants, cloud-only).