The Microsoft 365 functions I run every day — in one module.
MyPSFunctions is a working PowerShell toolkit for administering Entra ID, Exchange Online, SharePoint, Teams, Azure and Microsoft Graph. 300+ functions, grouped by service, refined in production tenants and published as-is.
A practitioner's toolkit, not a polished product.
Every function here earned its place by solving a real problem in a live Microsoft 365 tenant — a migration to run, a report to pull, an incident to chase down. They follow PowerShell's Verb-Noun grammar and carry a service prefix, so finding what you need is just Get-Command.
The action. Functions group by intent — Get, Generate, Connect, Convert, Restore.
The service it touches. Mg = Graph, EXO = Exchange Online, AAD = Entra ID.
The target. What the function reads, builds or changes in the tenant.
Organized the way you actually work.
Loaded as nested modules. A representative function or two from each — the full set is one Get-Command away.
Entra ID
Identity, licensing, group membership and token hygiene.
- Compare-AADGroupMembershipOfTwoGroups
- Generate-AADRegisteredDevicesReport
- Revoke-AADToken
Microsoft Graph
Reporting, Conditional Access, service principals and consents.
- Generate-MgConditionalAccessPoliciesReport
- Generate-MgUserMFAEnrollReport
- Find-MgScopesOfCMDlet
Exchange Online
Mailboxes, permissions, retention, message trace and eDiscovery.
- Investigate-EXOUserInboxRules
- Convert-EXOUserMailboxToSharedMailbox
- Run-EXOMailboxAuditLogSearch
SharePoint & OneDrive
Site administration, storage quotas and usage reporting.
- Generate-OneDriveStorageUsageReport
- Reset-OnedriveQuotaToDefault
- Get-PnPOffice365GroupOwners
Azure
Subscriptions, role assignments, firewall and NSG inventory.
- Backup-AzFirewallPolicies
- Generate-AzRoleAssignmentsReportForAllSubscriptions
- Switch-AzSubscription
Security & Sentinel
Sentinel queries, Defender reporting and incident response.
- Query-MicrosoftSentinel
- Close-AzSentinelIncidentByTitle
- Generate-AzDefenderReportForAllSubscriptions
Active Directory
On-premises accounts, group expansion and LDAP queries.
- Expand-ADGroupMembers
- New-ADOffice365User
- Request-ADUserusingLDAP
Teams
Skype-to-Teams migration, policy assignment and reporting.
- Migrate-SkypeToTeamsMigrationBatch
- Get-Detailed_CSOnlineUsers_Report
- Clear-TeamsCacheFolder
Office 365 & Connect
One-line connections, profiles, logging and module bootstrap.
- Connect-MyMgGraph
- Install-MyPSFunctionsModules
- Select-MyProfile
Three lines to your first command.
# Install from the PowerShell Gallery PS > Install-Module MyPSFunctions -Scope CurrentUser # Load it into your session PS > Import-Module MyPSFunctions # Discover what's inside, then read the help PS > Get-Command -Module MyPSFunctions PS > Get-Help Connect-MyMgGraph -Full
I build the automation, then publish it.
I'm John — I've spent 20+ years architecting, securing and automating Microsoft 365 environments for organizations across Canada, the United States and Europe.
MyPSFunctions is where the tooling I write along the way lives. It isn't a commercial product and it comes with no support — it's the honest, working toolkit of someone who administers these tenants for a living, shared in case it saves you the same hour it saved me.
If it's useful to you, or you just want to talk PowerShell and M365, I'd be glad to connect.