PowerShell Gallery · MyPSFunctions

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.

300+
Exported functions
9
Service domains
PSGallery
Install-Module ready
What it 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.

Generate-MgConditionalAccessPoliciesReport
VERB

The action. Functions group by intent — Get, Generate, Connect, Convert, Restore.

PREFIX

The service it touches. Mg = Graph, EXO = Exchange Online, AAD = Entra ID.

NOUN

The target. What the function reads, builds or changes in the tenant.

Nine service domains

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.

AAD

Entra ID

Identity, licensing, group membership and token hygiene.

  • Compare-AADGroupMembershipOfTwoGroups
  • Generate-AADRegisteredDevicesReport
  • Revoke-AADToken
Mg

Microsoft Graph

Reporting, Conditional Access, service principals and consents.

  • Generate-MgConditionalAccessPoliciesReport
  • Generate-MgUserMFAEnrollReport
  • Find-MgScopesOfCMDlet
EXO

Exchange Online

Mailboxes, permissions, retention, message trace and eDiscovery.

  • Investigate-EXOUserInboxRules
  • Convert-EXOUserMailboxToSharedMailbox
  • Run-EXOMailboxAuditLogSearch
SPO

SharePoint & OneDrive

Site administration, storage quotas and usage reporting.

  • Generate-OneDriveStorageUsageReport
  • Reset-OnedriveQuotaToDefault
  • Get-PnPOffice365GroupOwners
Az

Azure

Subscriptions, role assignments, firewall and NSG inventory.

  • Backup-AzFirewallPolicies
  • Generate-AzRoleAssignmentsReportForAllSubscriptions
  • Switch-AzSubscription
Cyber

Security & Sentinel

Sentinel queries, Defender reporting and incident response.

  • Query-MicrosoftSentinel
  • Close-AzSentinelIncidentByTitle
  • Generate-AzDefenderReportForAllSubscriptions
AD

Active Directory

On-premises accounts, group expansion and LDAP queries.

  • Expand-ADGroupMembers
  • New-ADOffice365User
  • Request-ADUserusingLDAP
Teams

Teams

Skype-to-Teams migration, policy assignment and reporting.

  • Migrate-SkypeToTeamsMigrationBatch
  • Get-Detailed_CSOnlineUsers_Report
  • Clear-TeamsCacheFolder
Core

Office 365 & Connect

One-line connections, profiles, logging and module bootstrap.

  • Connect-MyMgGraph
  • Install-MyPSFunctionsModules
  • Select-MyProfile
Quick start

Three lines to your first command.

PowerShell
# 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
Behind the module

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.