Launch offer: 20% off every migration plan until 31 January 2027. See prices
Scripting a Complete Source Tenant Inventory
← All resources
Free field guide•Automation & Tooling

Scripting a Complete Source Tenant Inventory

Build a complete, scriptable source-tenant inventory for M365 migrations, exporting every object class into normalized CSVs you can plan against.

#inventory#export#powershell#graph#csv
Instant access · PDF copy emailed · No credit card
12minRead time
7Chapters
intermediateLevel
PDFYours to keep
In-depth written guide
Run-it-yourself checklist
Real commands & examples
What you'll learn
  • 01What "complete" means
  • 02Setting up the export run
  • 03Exporting users
  • 04Exporting groups with membership counts
  • 05Exporting mailbox sizing
  • 06Exporting license consumption
  • 07Exporting sites and OneDrive
Preview

You cannot plan a migration you have not measured, and a portal screenshot is not a measurement. A complete source inventory — every user, group, mailbox, license, and site, exported to CSV with stable join keys — is the data set the entire project is built on. This guide is the inventory pass: a set of scripts you run against the source tenant to produce normalized files that downstream mapping, sizing, and validation scripts all consume.

What "complete" means

A useful inventory captures every object class that has to be migrated or accounted for, plus the metadata that drives decisions: size, last activity, license, and the identifiers you will join on later.

Object classSourceKey fields to capture
UsersGraph /usersUPN, mail, employeeId, immutableId, enabled, lastSignIn
GroupsGraph /groupsid, type, mailEnabled, securityEnabled, memberCount
MailboxesExchange OnlineUPN, type, size, item count, archive
LicensesGraph subscribedSkusSKU, assigned/enabled units, per-user plans
Sites/OneDrivePnP / SPOURL, owner, storage used, template

Write one CSV per class. Keep a stable join key (the user's id or employeeId) in every file so the files relate cleanly.

Setting up the export run

Stamp every run with an ID and write into a dated folder so you can diff inventories week over week — drift between discovery and cutover is real and worth tracking.

Keep reading the full guide — it's free
Who it's for
IT admins & migration leads
Security & compliance teams
MSPs running client cutovers
Before you ask

Is it really free?

Yes — completely. No trial, no card, no catch. Enter your email and the full guide opens instantly.

Will you spam me?

No. We'll email your copy and, only if you opt in, the occasional genuinely useful migration tip. One click unsubscribes you for good.

Can I share it with my team?

Please do. Forward the PDF or send them the link — every teammate can grab their own copy.