Learning Center · Script library
Browse the script catalog.
A curated free library of 390 scripts that IT administrators can use as a practical resource. Several are used internally, and others are sourced from open source projects.
⌘K
All scripts · 390 scripts
SORT
Add contacts to mailboxes
Entra / Microsoft 365 · Exchange Online·Copies organizational contacts from a SharePoint list into Exchange user mailboxes for newly licensed users, using app-only Microsoft Graph permissions.
Add owners to apps
Entra / Microsoft 365 · Applications·Finds Entra ID app registrations without owners and assigns the last modifier or creator as owner, using unified audit log records to identify who last managed each app.
Add Teams to group expiration policy
Entra / Microsoft 365 · Teams·Adds Microsoft Teams whose backing groups are not yet covered by the Microsoft 365 group expiration policy.
Analyze external calendar meetings
Entra / Microsoft 365 · Users & guests·Find out what external domains users who attend meetings belong to.
Analyze mail traffic
Entra / Microsoft 365 · Exchange Online·Using the Exchange Online message trace log to analyze inbound and outbound traffic.
Analyze mail traffic users
Entra / Microsoft 365 · Exchange Online·Using the Exchange Online message trace log to analyze messages sent to external and internal domains by mailboxes.
Analyze mail traffic with Graph
Entra / Microsoft 365 · Exchange Online·Using the Exchange Online message trace log to analyze inbound and outbound traffic with the Graph API.
Analyze message trace historical logs
Entra / Microsoft 365 · Exchange Online·Analyzes historical Exchange Online message tracking logs exported to CSV files and summarizes traffic patterns.
Analyze Send As audit data
Entra / Microsoft 365 · Compliance & audit·Compares Send As audit records against mailbox Send As permissions to find events that lack a matching permission assignment.
Analyze sensitivity label usage
Entra / Microsoft 365 · Compliance & audit·A script to analyze the usage of sensitivity labels based on Office 365 audit log data.
Analyze teams external chats
Entra / Microsoft 365 · Teams·Analyze User chats to find chats with people outside the tenant.
Analyze teams meetings
Entra / Microsoft 365 · Teams·A script to show how to use Graph APIs to analyze Teams meetings and attendance reports for the last 60 days.
Apply exclude-all holds to inactive mailboxes
Entra / Microsoft 365 · Compliance & audit·Removes inactive mailboxes from compliance holds so they can be permanently deleted during cleanup.
Apply sensitivity labels to SharePoint files
Entra / Microsoft 365 · SharePoint & OneDrive·Applies sensitivity labels to unlabeled files in a SharePoint Online document library using Microsoft Graph.
Archive Microsoft 365 groups
Entra / Microsoft 365 · Groups·Archives a set of Microsoft 365 Groups so their content is preserved while collaboration is retired.
Assign colors to sensitivity labels
Entra / Microsoft 365 · Compliance & audit·A script to assign suitable traffic light colors to sensitivity labels.
Assign licenses via CSV
Entra / Microsoft 365 · Licensing·Script to assign licenses for a chosen SKU to a set of users imported from a CSV.
Assign local language strings to sensitivity labels
Entra / Microsoft 365 · Compliance & audit·A script showing how to set local language values for sensitivity labels using the Microsoft Translator service.
Assign multiple licenses
Entra / Microsoft 365 · Licensing·Demonstrates how to check available license units and existing assignments before assigning multiple SKUs to Entra ID users.
Audit retention label application records
Entra / Microsoft 365 · Compliance & audit·Searches audit records for retention label applications and reports labels applied by auto-label policies.
Audit SharePoint operations by user
Entra / Microsoft 365 · SharePoint & OneDrive·Generates a per-user CSV report of SharePoint Online document operations from the unified audit log.
Audit Teams meeting recording uploads
Entra / Microsoft 365 · Teams·Uses Office 365 audit log records to track uploads of Teams meeting recordings to SharePoint or OneDrive.
Audit Teams meeting records
Entra / Microsoft 365 · Teams·Shows how to find and interpret audit records captured for Teams meetings using advanced auditing.
Auto-apply retention labels
Entra / Microsoft 365 · Compliance & audit·Applies retention labels to files in SharePoint Online and OneDrive for Business sites.
Azure Automation: add members to Teams channels
Entra / Microsoft 365 · Teams·Uses a managed identity in Azure Automation to add members to Microsoft Teams channels via Microsoft Graph.
Azure Automation: find and remove Teams chats
Entra / Microsoft 365 · Teams·Runbook that searches Teams chat threads for a specific topic and removes matching conversations.
Azure Automation: groups expiration report
Entra / Microsoft 365 · Groups·Reports Microsoft 365 groups approaching expiration using Azure Automation and Microsoft Graph.
Check audit events runbook
Entra / Microsoft 365 · Compliance & audit·Azure Automation runbook that searches the Office 365 audit log for high-priority events and emails a summary to administrators.
Check Copilot license details
Entra / Microsoft 365 · Licensing·Check the details of the Microsoft 365 Copilot license assigned to a user account and report same.
Check MFA usage via audit records
Entra / Microsoft 365 · Users & guests·Demonstrates how to use Entra ID sign-in audit records to verify MFA usage by user accounts.
Check retention policy updates
Entra / Microsoft 365 · Compliance & audit·Script to check for changes made to a retention policy.
Check sensitivity labels on groups
Entra / Microsoft 365 · Compliance & audit·Originally featured in https://practical365.com/monitor-changes-sensitivity-labels-container-management/.
Check shared mailbox quotas
Entra / Microsoft 365 · Exchange Online·Example of how to check the current quota usage of shared mailboxes and email.
Check shared mailboxes
Entra / Microsoft 365 · Exchange Online·Check if people are signing into shared mailboxes. If they are, check if the accounts for the mailboxes are licensed for Exchange Online (Plan 1 or Plan 2).
Check shared mailboxes for MDO licensing
Entra / Microsoft 365 · Exchange Online·A script to check the Entra ID accounts used for shared mailboxes to figure out if they should be licensed for Microsoft Defender for Office 365 (MDO).
Check sign-ins for utility accounts
Entra / Microsoft 365 · Users & guests·Uses Microsoft Graph sign-in logs to detect sign-ins for accounts that should not authenticate, such as break-glass, service, and utility accounts.
Clean up mailbox with Graph
Entra / Microsoft 365 · Exchange Online·Demonstrates how to use Microsoft Graph queries to identify and remove mailbox items during cleanup.
Compliance search partially indexed items
Entra / Microsoft 365 · Compliance & audit·Original version written by Microsoft and published at https://docs.microsoft.com/en-us/microsoft-365/compliance/investigating-partially-indexed-items-in-ediscovery?view=o365-worldwide.
Convert account to internal user
Entra / Microsoft 365 · Users & guests·Converts an Entra ID account with an external identity so the user has a local tenant identity instead.
Convert distribution list to Microsoft 365 group
Entra / Microsoft 365 · Groups·Converts an Exchange Online distribution list to a Microsoft 365 group.
Convert dynamic distribution list to Microsoft 365 group
Entra / Microsoft 365 · Teams·Converts a dynamic distribution list to a Microsoft 365 group and team-enables the new group.
Convert mail contacts to guest accounts
Entra / Microsoft 365 · Users & guests·Converts Exchange Online mail contacts into Entra ID guest user accounts.
Convert Teams background files for v2
Entra / Microsoft 365 · Teams·Converts custom Teams V1 background images so they meet Teams v2 client size requirements, using local image resize helpers.
Copy groups from one user to another
Entra / Microsoft 365 · Groups·Copies all group memberships from one Microsoft 365 user to another.
Create Conditional Access policy for admin MFA
Entra / Microsoft 365 · Conditional Access·Creates a Conditional Access policy that requires multifactor authentication for all admin roles.
Create CSV files for SKUs and service plans
Entra / Microsoft 365 · Licensing·Exports tenant SKU and service plan data to CSV files for editing and use in licensing reports.
Create dynamic distribution lists from SMTP domains
Entra / Microsoft 365 · Exchange Online·Stamps primary SMTP addresses into custom attribute 13, then creates a dynamic distribution list for each domain in the organization.
Create Entra ID dynamic administrative units
Entra / Microsoft 365 · Groups·Creates dynamic administrative units scoped to each department found on licensed member users.
Create Entra ID dynamic groups
Entra / Microsoft 365 · Groups·Creates dynamic Microsoft 365 groups for each department found on licensed member users.
Create new Entra ID account
Entra / Microsoft 365 · Users & guests·Creates a new Entra ID user account and emails the account details to tenant administrators.
Create news items from RSS feed
Entra / Microsoft 365 · SharePoint & OneDrive·Using the SharePoint Pages API to create and publish news items from an RSS feed.
Decrypt protected SharePoint documents
Entra / Microsoft 365 · SharePoint & OneDrive·Uses Unlock-SPOSensitivityLabelEncryptedFile to decrypt sensitivity-label-protected SharePoint Online documents.
Decrypt protected SharePoint documents with Graph
Entra / Microsoft 365 · SharePoint & OneDrive·Uses Microsoft Graph to find encrypted SharePoint files, then decrypts them with Unlock-SPOSensitivityLabelEncryptedFile. Requires PowerShell 7+.
Disable Copilot Studio
Entra / Microsoft 365 · Licensing·Disables Copilot Studio by removing the Copilot Studio service plan from users licensed for Microsoft 365 Copilot.
Disable Entra app registration
Entra / Microsoft 365 · Applications·Disables a tenant-registered Entra application by setting its isDisabled property via Microsoft Graph.
Disable Exchange PowerShell for non-admins
Entra / Microsoft 365 · Conditional Access·Restricts Exchange Online PowerShell access to mailboxes owned by Exchange and Global administrators identified through PIM role assignments.
Disable junk email options
Entra / Microsoft 365 · Exchange Online·An Azure Automation runbook to look for recently added mailboxes and update their junk email configuration if necessary.
Email inactive group owners
Entra / Microsoft 365 · Groups·Emails Microsoft 365 group owners whose groups failed activity checks, warning that the groups may be obsolete.
Enable all Exchange audit events
Entra / Microsoft 365 · Exchange Online·Enables the maximum mailbox auditing level on all user and shared mailboxes, including PreservedMailItemProactively.
Enable Microsoft 365 group creation control
Entra / Microsoft 365 · Groups·Updates the Microsoft 365 Groups policy to restrict who can create new groups using a designated security group.
Export Word document to PDF
Entra / Microsoft 365 · SharePoint & OneDrive·Cleans DOCX fonts, uploads to OneDrive via Graph, exports through Word Online, and produces a print-optimized PDF.
Fetch Message Center posts with Graph
Entra / Microsoft 365 · Exchange Online·Fetch Microsoft 365 Message Center service announcements using Graph and report posts by workload, including delayed updates.
Find accounts with mail forwarding
Entra / Microsoft 365 · Exchange Online·Find user and shared mailboxes with mail forwarding addresses enabled or inbox rules that forward messages.
Find and report guests added to Teams
Entra / Microsoft 365 · Teams·Find and report guest users added to Teams in the last week using audit records, and email administrators when new guests need validation.
Find app consent grants
Entra / Microsoft 365 · Applications·Find consent grants for app permissions from records captured in the Microsoft 365 unified audit log.
Find audit events for a user
Entra / Microsoft 365 · Compliance & audit·Find and report unified audit log events for actions taken by a user over a specified period across Exchange, Teams, SharePoint, and compliance workloads.
Find candidate Copilot for Microsoft 365 users
Entra / Microsoft 365 · Licensing·Use Graph usage reports to identify licensed users who may be suitable candidates for Copilot for Microsoft 365 based on Teams, Exchange, OneDrive, and app activity.
Find Copilot audit records
Entra / Microsoft 365 · Compliance & audit·Find and report unified audit log records generated for Copilot for Microsoft 365 interactions, excluding mobile devices.
Find Copilot interactions with Graph
Entra / Microsoft 365 · Compliance & audit·Find Copilot interactions for a user between two dates using the Graph aiInteractionHistory API with app-only authentication.
Find deleted email audit records
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log to find who deleted messages via HardDelete and SoftDelete operations; output can be filtered to specific mailboxes.
Find devices from sign-in log
Entra / Microsoft 365 · Devices·Use Entra ID sign-in logs to identify registered devices in use and correlate them with user accounts.
Find Entra ID Direct Connect sign-ins
Entra / Microsoft 365 · Teams·Use Entra ID sign-in audit logs to find user accounts accessing external tenants via Teams Direct Connect (shared channels).
Find Graph permissions for cmdlets
Entra / Microsoft 365 · Applications·Return the Graph permissions needed to run a set of cmdlets, typically those used in a script.
Find groups with no owners or members
Entra / Microsoft 365 · Groups·Find and report Microsoft 365 groups, security groups, and distribution lists that have no owners or no members.
Find guests from blocked B2B domains
Entra / Microsoft 365 · Groups·Report guest members in Microsoft 365 Groups whose email domains are blocked by the Entra ID B2B collaboration policy.
Find inactive distribution lists
Entra / Microsoft 365 · Exchange Online·Find inactive distribution lists based on Exchange Online message trace data, covering up to the last 10 days.
Find inactive distribution lists (90 days)
Entra / Microsoft 365 · Exchange Online·Find inactive distribution lists using historical message trace data downloaded from Exchange Online, covering up to 90 days.
Find inactive email users
Entra / Microsoft 365 · Exchange Online·Find inactive email users based on the message trace information, which means we can only go back ten days.
Find inactive Entra ID guests with audit
Entra / Microsoft 365 · Users & guests·Find inactive Entra ID guest accounts and report their recent audit log activity, optionally emailing the results.
Find junk email sender domains
Entra / Microsoft 365 · Exchange Online·Find domains that send junk email to your tenant by examining items in the Junk Email folder of user and shared mailboxes.
Find last accessed date for SharePoint documents
Entra / Microsoft 365 · SharePoint & OneDrive·Find the last accessed date for documents in a SharePoint Online site using unified audit log records.
Find Loop app users
Entra / Microsoft 365 · Users & guests·Find licensed users who are actively using the Microsoft Loop app based on audit log activity.
Find MailItemsAccessed audit records
Entra / Microsoft 365 · Compliance & audit·Process Microsoft 365 MailItemsAccessed unified audit log records and format them into a more digestible report.
Find Microsoft 365 admin center sign-ins
Entra / Microsoft 365 · Users & guests·Find user accounts that signed into the Microsoft 365 admin center in the last 30 days and report their MFA status.
Find Microsoft 365 Groups with blocked guests
Entra / Microsoft 365 · Groups·Scan Microsoft 365 Groups to find groups with guest members where the group sensitivity label blocks external guest access.
Find non-SSPR enabled users
Entra / Microsoft 365 · Users & guests·Find Entra ID licensed member accounts that are not capable of self-service password reset (SSPR).
Find obsolete guest accounts by activity
Entra / Microsoft 365 · Users & guests·Find inactive Entra ID guest accounts based on audit log and message trace activity over the last 90 days.
Find obsolete guest accounts by activity (v2)
Entra / Microsoft 365 · Users & guests·Perform an activity-based analysis of Entra ID guest user accounts and highlight accounts that are not being used. Requires Azure AD Preview and Exchange Online modules.
Find obsolete guest accounts by activity (v3)
Entra / Microsoft 365 · Users & guests·Perform an activity-based analysis of Entra ID guest user accounts and highlight accounts that are not being used, using Graph and Exchange Online.
Find obsolete SharePoint Online sites
Entra / Microsoft 365 · SharePoint & OneDrive·A script to find SharePoint Online sites that have not had any content modifications for a specified number of days. This can be used to identify sites that are potentially obsolete and can be removed or archived.
Find old Entra ID guest accounts
Entra / Microsoft 365 · Users & guests·Find Entra ID guest user accounts older than 365 days and report the groups they belong to.
Find old Entra ID guest users
Entra / Microsoft 365 · Users & guests·Find Entra ID guest user accounts older than 365 days (adjust the age threshold as needed) and report the groups they belong to.
Find orphan OneDrive for Business sites
Entra / Microsoft 365 · SharePoint & OneDrive·Find orphan OneDrive for Business accounts and add an admin user so the sites can be accessed and managed.
Find potential directory problems
Entra / Microsoft 365 · Users & guests·Quick script to highlight potential directory hygiene issues in a Microsoft 365 tenant, such as missing office, phone, or city attributes on user mailboxes.
Find Send and Search audit records
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log for Send, SharePoint search, and Exchange search operations, as used in Office 365 for IT Pros Chapter 21 examples.
Find Send As audit records
Entra / Microsoft 365 · Compliance & audit·Find Send As records in the Microsoft 365 audit log and identify events belonging to user and shared mailboxes versus group mailboxes and Teams.
Find SharePoint files with downgraded sensitivity labels
Entra / Microsoft 365 · SharePoint & OneDrive·Find files in SharePoint Online where users removed or lowered the assigned sensitivity label, using unified audit log records.
Find tabs and apps in Teams
Entra / Microsoft 365 · Teams·Report tabs and apps installed in Teams channels using Microsoft Graph app-only authentication.
Find targeted collection folder identifiers
Entra / Microsoft 365 · Compliance & audit·Generate folder identifiers for use in a compliance content search targeting specific Recoverable Items folders in primary and archive mailboxes.
Find Teams channels with website tabs
Entra / Microsoft 365 · Teams·Find Teams channel tabs that point to external websites across all teams in the tenant.
Find Teams channels with wiki
Entra / Microsoft 365 · Teams·Find wiki tabs in Teams channels and report whether wiki configuration content is present.
Find Teams member-added events for monitored users
Entra / Microsoft 365 · Teams·Detect when users matching a display name pattern are added to Teams membership and email a report of the events.
Find Teams memberships for users
Entra / Microsoft 365 · Teams·Use Graph to generate a report of Teams memberships for users in a specified group.
Find underused Copilot for Microsoft 365 licenses
Entra / Microsoft 365 · Licensing·Check users with Copilot for Microsoft 365 licenses who may not be using the features as expected, and optionally reclaim licenses.
Find underused Copilot licenses with audit
Entra / Microsoft 365 · Licensing·Check users with Copilot for Microsoft 365 licenses who may not be using the features as expected, enriched with Graph audit data on Copilot interactions.
Find unused service principals
Entra / Microsoft 365 · Applications·Find service principals that have not signed in to Microsoft 365 in the last year and generate statistics about service principals in the tenant.
Find unused SMTP proxy addresses (10 days)
Entra / Microsoft 365 · Exchange Online·Check user and shared mailboxes to find SMTP proxy addresses that have not been used to send or receive email in the last 10 days, using Exchange Online message trace data.
Find unused SMTP proxy addresses (90 days)
Entra / Microsoft 365 · Exchange Online·Check user and shared mailboxes to find SMTP proxy addresses that have not been used to send or receive email in the last 90 days, using historical message trace data downloaded from Exchange Online.
Find updated Microsoft 365 notifications
Entra / Microsoft 365 · Exchange Online·Download Message Center service notifications from the Microsoft 365 admin center and process them with PowerShell.
Find user audit activities
Entra / Microsoft 365 · Compliance & audit·Demonstrate using the Microsoft 365 audit log to find user activities over the past week and help determine whether an account may be compromised.
Find when anonymous link used
Entra / Microsoft 365 · SharePoint & OneDrive·Find when an anonymous link is used by someone outside the tenant to access SharePoint Online and OneDrive for Business documents.
Find who added guests to groups
Entra / Microsoft 365 · Groups·A script to find and report who added new guest members to Microsoft 365 Groups (and Teams) over the last 90 days.
Find who created guests through SPO sharing
Entra / Microsoft 365 · SharePoint & OneDrive·Find who created new guest accounts in a Microsoft 365 tenant through SharePoint Online sharing invitations.
Fix proxy email addresses
Entra / Microsoft 365 · Exchange Online·Fix up primary and proxy email addresses for mailboxes, groups, and distribution lists.
Generate Teams directory
Entra / Microsoft 365 · Teams·Generate a list of Teams with deep links that can be turned into a Teams directory with clickable hyperlinks.
Generate Teams directory (Graph)
Entra / Microsoft 365 · Teams·Generate a list of Teams with deep links using Microsoft Graph that can be turned into a Teams directory with clickable hyperlinks.
Get audit records (Graph SDK)
Entra / Microsoft 365 · Compliance & audit·Example script to show how to run an audit query using the Microsoft Graph PowerShell SDK.
Get audit records for tagged SPO files
Entra / Microsoft 365 · Compliance & audit·Report audit records generated when SharePoint Online files are tagged with a retention label.
Get Bing images for Teams backgrounds
Entra / Microsoft 365 · Teams·Fetch daily Bing photos into the Teams background images folder for the last seven days and remove images older than 30 days.
Get Copilot audit records
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log for Copilot for Microsoft 365 interaction records and report activity by user and Copilot app host.
Get Entra ID access review details (Graph)
Entra / Microsoft 365 · Groups·Navigate the Microsoft Graph API for Entra ID access reviews, including reviews scoped to all groups and Teams.
Get Graph permissions for a script
Entra / Microsoft 365 · Applications·Parse a script block, list Microsoft Graph PowerShell SDK commands it uses, and report the Graph permissions each command requires.
Get graph user statistics
Entra / Microsoft 365 · Users & guests·Example of using the Microsoft Graph PowerShell SDK to get usage report data for Entra ID accounts from multiple Microsoft 365 workloads.
Get Graph user statistics report
Entra / Microsoft 365 · Users & guests·A sample script showing how to gather user activity information from the Graph and assemble it into one report.
Get holds on mailbox
Entra / Microsoft 365 · Exchange Online·Report holds in place for a mailbox and interpret their meaning. Requires Exchange Online and Security & Compliance PowerShell connections.
Get IP geolocation
Entra / Microsoft 365 · Users & guests·Query the IP-API endpoint to retrieve geolocation information for an IP address, useful for enriching Microsoft 365 audit record data.
Get labels and check Microsoft 365 groups
Entra / Microsoft 365 · Groups·Find groups without a sensitivity container label, apply a default label, and verify Microsoft 365 groups have the correct container management label via Graph schema extensions.
Get large mailbox items
Entra / Microsoft 365 · Exchange Online·Find large items in a mailbox Inbox over a size threshold within a date range using Microsoft Graph app-only authentication.
Get last active time mailboxes
Entra / Microsoft 365 · Exchange Online·Report last active time for mailboxes.
Get Planner plans for user
Entra / Microsoft 365 · Users & guests·Use Microsoft Graph with delegated permissions to report the Planner plans a user can access.
Get Planner plans for user (device code)
Entra / Microsoft 365 · Users & guests·Use Microsoft Graph with device code authentication to report the Planner plans a user can access.
Get Power Automate flows
Entra / Microsoft 365 · Applications·Report connectors used by Power Automate flows in a tenant to help plan Data Loss Prevention policies.
Get service alerts (Graph)
Entra / Microsoft 365 · Compliance & audit·Retrieve Microsoft 365 service health alerts using the Microsoft Graph Security API and report active issues.
Get service health information (Graph)
Entra / Microsoft 365 · Exchange Online·Example of using the Graph Service Communication API with Microsoft Graph PowerShell SDK cmdlets.
Get service principal sign-ins (Graph)
Entra / Microsoft 365 · Applications·Extract and analyze service principal sign-in data from Entra ID using the Microsoft Graph API.
Get Teams reactions
Entra / Microsoft 365 · Teams·Report emoji reactions found in Teams channel messages over a date range.
Get tenant feature updates (Graph)
Entra / Microsoft 365 · Applications·Use the Microsoft 365 Service Communications Graph API to retrieve feature updates planned for a tenant.
Get tenant user count
Entra / Microsoft 365 · Users & guests·A simple script to count the number of users in a Microsoft 365 tenant.
Get user sign-in data (Graph SDK)
Entra / Microsoft 365 · Users & guests·Fetch user sign-in data from Microsoft Graph using Graph SDK cmdlets.
Get user sign-in data (Graph)
Entra / Microsoft 365 · Users & guests·A script to fetch user sign-in data from the Microsoft Graph.
Get users with phone MFA method
Entra / Microsoft 365 · Users & guests·Find user accounts with a phone-based MFA method so administrators can email them to register a stronger authentication method.
Hide groups used by teams
Entra / Microsoft 365 · Teams·Hide the Microsoft 365 Groups used by Teams which might be still visible to Exchange clients and the Exchange address lists.
Last logon by external users
Entra / Microsoft 365 · Users & guests·Find the last time guest accounts (external users) signed in to the Microsoft 365 tenant.
Mail traffic statistics
Entra / Microsoft 365 · Exchange Online·Illustration of how to use the data produced by the Get-MailTrafficSummaryReport cmdlet to create a useful per-mailbox report.
Migrate user profile card settings
Entra / Microsoft 365 · Users & guests·Migrate custom properties on the Microsoft 365 user profile card to standard Entra ID attributes such as EmployeeId and CostCenter.
Monitor teams member additions
Entra / Microsoft 365 · Teams·Using the unified audit log to monitor for additions of new members to Teams.
New account tracking azure automation
Entra / Microsoft 365 · Applications·Test script to show how to use Azure Automation with the Microsoft Graph PowerShell SDK.
New retention policy for shared mailboxes
Entra / Microsoft 365 · Compliance & audit·A script to add shared mailboxes to a dedicated Microsoft 365 retention policy.
New Teams channel meeting
Entra / Microsoft 365 · Teams·Create a channel-bound Teams meeting, add a calendar event to the team group calendar, and optionally post a channel announcement with the join link.
Populate org contacts
Entra / Microsoft 365 · Exchange Online·A script to write organization contacts to user mailboxes.
Populate team shared channel
Entra / Microsoft 365 · Teams·Populate the membership of a Teams shared channel with every licensed user account in the tenant.
Populate Teams directory SharePoint list (Graph)
Entra / Microsoft 365 · Teams·Populate a SharePoint list with Teams directory data using the Microsoft Graph PowerShell SDK.
Populate Teams directory SharePoint list (PnP)
Entra / Microsoft 365 · Teams·Populate a SharePoint list with Teams directory data using PnP.PowerShell.
Populate teams external access
Entra / Microsoft 365 · Teams·Finds the domains used by guest accounts and uses them to build an external access allow list.
Populate teams holidays
Entra / Microsoft 365 · Teams·Update the Teams holiday schedule with new events.
Post items to HTTP workflow
Entra / Microsoft 365 · Teams·Posting an adaptive card to the Power Automate 'Post to a channel when a webhook request is received' workflow.
Post new Microsoft 365 roadmap items
Entra / Microsoft 365 · Teams·Fetch items from the Microsoft 365 roadmap, store them in a CSV file, and post recent updates to a Teams channel using an incoming webhook.
Process expiring guest accounts
Entra / Microsoft 365 · Users & guests·Remove expired guest accounts, identify guests expiring in the next 30 days, and email administrators with accounts to review.
Provision OneDrive accounts
Entra / Microsoft 365 · SharePoint & OneDrive·A script to pre-provision OneDrive for Business accounts.
Purge compliance search items
Entra / Microsoft 365 · Compliance & audit·An example script to show how to purge items found by a compliance search.
Purge messages with content search
Entra / Microsoft 365 · Exchange Online·Purge messages from Exchange Online using a Compliance Search and a purge action applied to the search results.
Purge messages with search mailbox
Entra / Microsoft 365 · Exchange Online·A script to purge messages from Exchange Online using the famous Search-Mailbox cmdlet. The script can either delete items or report an estimate.
Query Copilot (Graph)
Entra / Microsoft 365 · Compliance & audit·Demonstrate querying the Copilot retrieval Microsoft Graph API.
Remove inactive user accounts
Entra / Microsoft 365 · Users & guests·Azure Automation runbook that disables Entra ID accounts inactive beyond a threshold, marks them for review, and deletes accounts that remain disabled on a subsequent run.
Remove kaizala service plans
Entra / Microsoft 365 · Licensing·Disable Kaizala service plans from Microsoft 365 E1, E3, and E5 licenses.
Remove licenses disabled accounts
Entra / Microsoft 365 · Licensing·Example of how to remove licenses from disabled Entra ID accounts.
Remove Microsoft 365 user account
Entra / Microsoft 365 · Users & guests·Prototype script to show how to remove a user account from Microsoft 365 and set up retention policies for the user's mailbox and OneDrive for Business site.
Remove obsolete mobile devices
Entra / Microsoft 365 · Devices·An example script to show how to remove obsolete mobile device partnerships from user mailboxes. Users can't do this any longer.
Remove permissions shared mailbox
Entra / Microsoft 365 · Exchange Online·Sample script to show how to remove permissions for one or more users from shared mailboxes.
Remove posts team channel
Entra / Microsoft 365 · Teams·A script to demonstrate how to clean out all messages from a channel.
Remove service plan
Entra / Microsoft 365 · Licensing·A script to show how to remove a single service plan from the licenses assigned to a Microsoft 365 account.
Remove service plan mg graph
Entra / Microsoft 365 · Licensing·Remove an individual service plan from a SKU assigned to Microsoft 365 accounts using cmdlets from the Microsoft Graph PowerShell SDK.
Remove service plan2
Entra / Microsoft 365 · Licensing·Remove an individual service plan from a SKU assigned to Microsoft 365 accounts.
Remove service plan3
Entra / Microsoft 365 · Licensing·Remove an individual service plan from a SKU assigned to Microsoft 365 accounts.
Remove utility messages from mailboxes
Entra / Microsoft 365 · Exchange Online·Example of how to use the Microsoft Graph PowerShell SDK cmdlets to remove "utility" messages from user mailboxes.
Remove viva engage core service plan
Entra / Microsoft 365 · Licensing·Disable the Viva Engage Core service plan from Microsoft 365 E1, E3, and E5 licenses when the Yammer Enterprise plan is already disabled.
Rename Microsoft 365 groups for naming policy
Entra / Microsoft 365 · Groups·A script to rename Microsoft 365 Groups that don't comply with the tenant naming policy.
Report active Teams
Entra / Microsoft 365 · Teams·Report active Teams by checking compliance records in associated Microsoft 365 Groups.
Report activity alert audit events
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log for SecurityComplianceAlerts records and report activity alert events.
Report adaptive scopes
Entra / Microsoft 365 · Compliance & audit·Demonstrate the use of the Get-AdaptiveScope and Get-AdaptiveScopeMembers cmdlets to report on adaptive scopes for Purview.
Report admin Entra ID accounts without MFA
Entra / Microsoft 365 · Users & guests·Find Entra ID accounts with privileged roles that are not protected by MFA.
Report all email proxy addresses
Entra / Microsoft 365 · Exchange Online·A script to report all the proxy addresses assigned to mail-enabled objects in the organization.
Report app audit events
Entra / Microsoft 365 · Applications·Uses the AuditLog Query Graph API to fetch audit events for app creation and updates and report them to administrators.
Report apps and service principals
Entra / Microsoft 365 · Applications·A script (or runbook) to scan service principals and registered applications in an Entra ID (Azure AD) tenant.
Report archived teams
Entra / Microsoft 365 · Teams·Script to show how to report Teams archiving actions extracted from the Office 365 audit log.
Report AU roles and members
Entra / Microsoft 365 · Groups·Use the Microsoft Graph PowerShell SDK to report administrative units, role assignments for AU management, and AU membership.
Report audit events via email runbook
Entra / Microsoft 365 · Compliance & audit·Azure Automation runbook that queries the audit log and sends email about audit events; can also run interactively with app-only Graph authentication.
Report audit rec failed sign in
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log for failed user login audit records.
Report audit recs file updates
Entra / Microsoft 365 · Compliance & audit·Example of using audit records to find out who changed a file.
Report audit recs group creation
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log for Microsoft 365 group creation events and report group details.
Report audit recs guest doc access
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log for guest document access events in SharePoint Online and OneDrive.
Report audit recs user sign ins
Entra / Microsoft 365 · Compliance & audit·Search the unified audit log for user sign-in and Teams session start events.
Report authentication methods
Entra / Microsoft 365 · Users & guests·A report of the authentication methods for Azure AD licensed accounts.
Report auto expanding archives
Entra / Microsoft 365 · Exchange Online·Find mailboxes with auto-expanding archives and report proximity to the 1.5 TB limit, daily growth rate, and projected fill date.
Report calendar items
Entra / Microsoft 365 · Exchange Online·Generate a report of calendar items for a mailbox.
Report compliance case holds
Entra / Microsoft 365 · Compliance & audit·Generate a report about holds for eDiscovery cases.
Report compliance role groups
Entra / Microsoft 365 · Compliance & audit·Create a report about compliance role groups in a Microsoft 365 tenant, listing each group with its assigned roles and members.
Report conditional access policies
Entra / Microsoft 365 · Conditional Access·A script to show how to report conditional access policy settings.
Report container management labels
Entra / Microsoft 365 · Groups·Create a report about container management labels and highlight Microsoft 365 groups without a label or without owners.
Report Copilot interactions
Entra / Microsoft 365 · Compliance & audit·Fetch Copilot interaction details from compliance records in the TeamsMessagesData mailbox folder using Exchange Online and Microsoft Graph.
Report Copilot licensed users
Entra / Microsoft 365 · Licensing·A script to generate a comprehensive report of all users who have Microsoft 365 Copilot licenses assigned.
Report Copilot usage with user detail
Entra / Microsoft 365 · Licensing·Combine Microsoft 365 Copilot usage data with user details for a tenant-wide report.
Report d ls and managers
Entra / Microsoft 365 · Groups·Quick and dirty script to report the managers of distribution lists.
Report daily sign-ins
Entra / Microsoft 365 · Users & guests·Analyze and report daily sign-ins from the Entra ID sign-in audit log, including risky users, and email the results to tenant administrators.
Report delegated permissions
Entra / Microsoft 365 · Applications·A script to demonstrate how to report delegated permissions held by Entra ID user accounts.
Report delegated permssions
Entra / Microsoft 365 · Applications·A script to report delegated permission grants for Entra ID service principals and user accounts.
Report deleted Entra ID objects
Entra / Microsoft 365 · Users & guests·Report soft-deleted objects in the Entra ID recycle bin, including users, groups, apps, service principals, administrative units, and conditional access policies.
Report deleted odsp documents
Entra / Microsoft 365 · SharePoint & OneDrive·A script to report deletion activity for SharePoint Online and OneDrive for Business documents based on information in the Office 365 audit log.
Report delve insights disabled
Entra / Microsoft 365 · Exchange Online·Report Microsoft 365 accounts that are disabled for the Delve Document Insights feature.
Report dl memberships counts
Entra / Microsoft 365 · Exchange Online·Report the membership and counts for distribution lists in Exchange Online.
Report dl memberships counts graph
Entra / Microsoft 365 · Exchange Online·Report the membership and counts for distribution lists in Exchange Online - the Graph version. The pure PowerShell version is in.
Report dl memberships counts mg graph
Entra / Microsoft 365 · Exchange Online·A script to demonstrate how to use the Microsoft Graph PowerShell SDK to report Exchange Online distribution list members.
Report document sensitivity label mismatches
Entra / Microsoft 365 · Compliance & audit·A script to show how to find audit records for document mismatch events (the sensitivity label applied to an uploaded.
Report eDiscovery cases
Entra / Microsoft 365 · Compliance & audit·Report eDiscovery cases in the tenant, including status, members, and hold policy details.
Report enforced time stamps
Entra / Microsoft 365 · Exchange Online·Report compliance time stamps written into Exchange Online mailboxes that guide the Managed Folder Assistant when applying retention policies and holds.
Report entra group insights
Entra / Microsoft 365 · Groups·A script to show how to extract the Entra Groups insights from the Graph to report them in a readable format.
Report Entra ID governance costs
Entra / Microsoft 365 · Compliance & audit·Read Entra ID audit logs to find records where guest accounts use ID Governance chargeable features and report associated costs.
Report Entra ID guest sponsors
Entra / Microsoft 365 · Users & guests·Report the sponsors assigned to Entra ID guest accounts.
Report Entra registered devices
Entra / Microsoft 365 · Devices·Generate a report about Entra registered devices using the Microsoft Graph PowerShell SDK.
Report EXO mailbox folder stats
Entra / Microsoft 365 · Exchange Online·Report user mailboxes (including archives) with statistics for each folder.
Report expiring app secrets
Entra / Microsoft 365 · Applications·Check Entra ID registered applications for app secrets due to expire within the specified window.
Report expiring link extended
Entra / Microsoft 365 · Compliance & audit·Check modules - Exchange Online used for Search-UnifiedAuditLog. Azure AD is to check the guest account and report a display name.
Report expiring passwords
Entra / Microsoft 365 · Users & guests·Example of how to use the Microsoft Graph PowerShell SDK to generate a password expiration report.
Report external email sent
Entra / Microsoft 365 · Exchange Online·Script to demonstrate how to create a report about the external email activity of individuals identified through.
Report external tenant access by guests
Entra / Microsoft 365 · Users & guests·Generate a report of member accounts who have accessed apps in external tenants in a Microsoft 365 environment.
Report file sharing audit events
Entra / Microsoft 365 · Compliance & audit·Report audit events for file sharing from SharePoint Online and OneDrive for Business when sharing occurs with tenant members or guests.
Report files spo site
Entra / Microsoft 365 · SharePoint & OneDrive·Generate a report of files in a SharePoint Online site using Microsoft Graph APIs.
Report group based license counts
Entra / Microsoft 365 · Licensing·Report on group-based licensing in a tenant by analyzing the licenses assigned through each group and sending a report by email.
Report groups teams activity
Entra / Microsoft 365 · Teams·A script to check the activity of Microsoft 365 Groups and Teams and report the groups and teams that might be deleted because they're not used.
Report hard deleted user accounts
Entra / Microsoft 365 · Users & guests·Example of an Azure Automation runbook to report Entra ID hard-deleted user accounts.
Report inactive teams by email
Entra / Microsoft 365 · Teams·Report inactive Teams based on activity recorded in audit logs and email the report to administrators.
Report individual application licenses
Entra / Microsoft 365 · Licensing·An exmaple of how to report license assignments for applications like Forms or Teams assigned to users through license bundles like Office 365 E3.
Report individual user sessions
Entra / Microsoft 365 · Users & guests·An example script to report the events for an individual user session based on the session identifier assigned by Entra ID.
Report iOS devices with Authenticator
Entra / Microsoft 365 · Devices·Report users who have iOS devices with the Microsoft Authenticator app installed by scanning authentication methods.
Report label changes audit records
Entra / Microsoft 365 · Compliance & audit·Example of how to use Microsoft 365 audit records to track changes made in sensitivity labels and policies.
Report last account sign in mg
Entra / Microsoft 365 · Users & guests·Fetch user account sign in data using the Microsoft Graph SDK for PowerShell.
Report last app accessed by users
Entra / Microsoft 365 · Applications·Use the Entra ID sign-in audit log and Microsoft 365 audit log to report the last Microsoft 365 app each user accessed.
Report last successful sign in
Entra / Microsoft 365 · Users & guests·Demo script to show the use of the new (from 1-Dec-2023) lastSuccessfulSignInDateTime property currently available in beta.
Report license assignments to users
Entra / Microsoft 365 · Licensing·Report license assignments to users.
Report loop workspaces
Entra / Microsoft 365 · Teams·Example script to show how to report Loop workspaces, including pagination when there are more than 200 workspaces in the tenant.
Report M365 group memberships
Entra / Microsoft 365 · Groups·A script to report the membership of all Microsoft 365 Groups in a tenant.
Report M365 group memberships graph
Entra / Microsoft 365 · Groups·A script to report the membership of all Microsoft 365 Groups in a tenant using Graph calls instead of PowerShell.
Report mail usage domains
Entra / Microsoft 365 · Exchange Online·An example of how to read mail usage data for a tenant using the Microsoft Graph PowerShell SDK.
Report mailbox auditing configuration
Entra / Microsoft 365 · Compliance & audit·A script to report the audit configuration for all user and shared mailboxes.
Report mailbox folder assistant activity
Entra / Microsoft 365 · Exchange Online·List mailboxes and the last time the Mailbox Folder Assistant processed each mailbox.
Report mailbox items graph
Entra / Microsoft 365 · Exchange Online·A script to demonstrate how to use Graph API queries to read the folders and folder items from an Exchange Online mailbox.
Report mailbox messages (SDK)
Entra / Microsoft 365 · Exchange Online·Use Microsoft Graph PowerShell SDK queries to read folders and items from an Exchange Online mailbox.
Report mailbox permissions mailboxes
Entra / Microsoft 365 · Exchange Online·Quick and simple script to generate a report of non-standard permissions applied to Exchange Online user and shared mailboxes.
Report mailbox quota used
Entra / Microsoft 365 · Exchange Online·Script to report mailbox quota assigned and percentage used and to signal warning if quota used exceeds set threshold.
Report mailbox rights assignments
Entra / Microsoft 365 · Exchange Online·Quick script to find audit records for rights assigned to mailboxes to allow us to notify the mailbox owner.
Report mailbox sizes
Entra / Microsoft 365 · Exchange Online·Script to demonstrate how to report mailbox statistics using Graph usage data.
Report mailboxes enabled for EWS
Entra / Microsoft 365 · Exchange Online·Report mailboxes still enabled for Exchange Web Services (EWS) and email a nominated recipient to review and disable EWS where no longer needed.
Report managed identity permissions
Entra / Microsoft 365 · Applications·Report the Graph and other permissions assigned to managed identities.
Report managers and direct reports
Entra / Microsoft 365 · Exchange Online·A script to report the managers and their direct reports in a tenant using Exchange Online cmdlets.
Report managers and direct reports graph
Entra / Microsoft 365 · Users & guests·A script to report the managers and their direct reports in a tenant using the Microsoft Graph PowerShell SDK.
Report membership M365 group
Entra / Microsoft 365 · Groups·Report the membership of a Microsoft 365 Group.
Report MFA status for admins
Entra / Microsoft 365 · Users & guests·Use the User Registration Details API to report admin accounts that are not MFA-enabled.
Report MFA status for users
Entra / Microsoft 365 · Users & guests·Report the authentication methods registered for Entra ID user accounts.
Report Microsoft 365 groups expiration
Entra / Microsoft 365 · Groups·A script to show how to use the Microsoft Graph PowerShell SDK to report on the expiration of Microsoft 365 groups.
Report mobile devices
Entra / Microsoft 365 · Devices·Extract mobile device statistics from devices registered with Exchange Online mailboxes.
Report MRM tags on folders
Entra / Microsoft 365 · Exchange Online·Scan an Exchange Online mailbox and report the retention tag setting for each folder.
Report non user audit events
Entra / Microsoft 365 · Compliance & audit·This script generates a report of non-user audit events logged for a Microsoft 365 tenant over the last 7 days.
Report non-MFA sign-ins
Entra / Microsoft 365 · Users & guests·A script to show how to use the Microsoft Graph PowerShell SDK to report on non-MFA sign-ins in Microsoft 365.
Report OneDrive files
Entra / Microsoft 365 · SharePoint & OneDrive·Generate a report of files in a user's OneDrive account using Microsoft Graph APIs.
Report OneDrive storage usage
Entra / Microsoft 365 · SharePoint & OneDrive·Report OneDrive for Business storage usage across the tenant using SharePoint Online PowerShell.
Report OneDrive usage
Entra / Microsoft 365 · SharePoint & OneDrive·Example of generating a report about OneDrive for Business storage consumption using Microsoft 365 usage reports.
Report permission consent requests
Entra / Microsoft 365 · Applications·Script showing how to report the permission consent requests executed by users.
Report permissions apps
Entra / Microsoft 365 · Applications·A script using Azure Automation and a managed identity to scan for apps assigned high-priority permissions and report them.
Report permissions folder level
Entra / Microsoft 365 · Exchange Online·Uses Exchange Online Management module (REST).
Report permissions on mailboxes
Entra / Microsoft 365 · Exchange Online·Quick and simple script to generate a report of non-standard permissions applied to Exchange Online user and shared mailboxes.
Report PIM role assignments by email
Entra / Microsoft 365 · Users & guests·Search the Entra ID audit log for PIM role assignment events and email a weekly report to specified addresses.
Report plans
Entra / Microsoft 365 · Groups·Generate a report of Planner tasks linked to Microsoft 365 Groups, including task counts, bucket breakdown, and member completion analysis.
Report primary archive folder sizes
Entra / Microsoft 365 · Exchange Online·Report primary and archive folder sizes for a specified Exchange Online mailbox.
Report priority cleanup spo audit records
Entra / Microsoft 365 · Compliance & audit·Find Priority Cleanup audit records for SharePoint Online documents that policy tags and moves to the second-stage recycle bin.
Report quarantined messages
Entra / Microsoft 365 · Exchange Online·Showing how to download details of quarantined messages, do some analysis, and create a CSV file that can be edited.
Report recent dl changes
Entra / Microsoft 365 · Exchange Online·Report recent additions, changes, and deletions of Exchange Online distribution lists over the last 30 days, plus a full DL inventory with membership and ownership in HTML, Excel, or CSV format.
Report recent group operations
Entra / Microsoft 365 · Groups·Report recent additions, changes, and deletions of Microsoft 365 groups over the last 30 days, plus a full group inventory with membership and ownership in HTML, Excel, or CSV format.
Report recoverable items
Entra / Microsoft 365 · Exchange Online·Use the Microsoft Graph PowerShell SDK to report details of items in the Exchange Online Recoverable Items structure.
Report recoverable items (PowerShell)
Entra / Microsoft 365 · Exchange Online·Report items stored in the Exchange Online Recoverable Items folder using the Get-RecoverableItems cmdlet.
Report restore recoverable items audit
Entra / Microsoft 365 · Compliance & audit·Needs connection to Exchange Online and Azure AD.
Report retention label assignments
Entra / Microsoft 365 · Compliance & audit·Report on retention label assignments in a tenant for the last 30 days.
Report retention label audit events
Entra / Microsoft 365 · Compliance & audit·Example used in Chapter 20 of how to find and report retention labels assigned to documents.
Report role assignments
Entra / Microsoft 365 · Users & guests·Report Entra ID role assignments (PIM eligible or active, and direct) using the Microsoft Graph PowerShell SDK.
Report room mailbox usage
Entra / Microsoft 365 · Exchange Online·A version of the original ReportRoomMailboxUsage script converted to replace Graph API requests.
Report room mailbox usage
Entra / Microsoft 365 · Exchange Online·Reports how busy room and workspace mailboxes are using Microsoft Graph calendar data, including daily usage patterns.
Report room mailbox usage (Azure Automation)
Entra / Microsoft 365 · Exchange Online·Azure Automation runbook that reports room and workspace mailbox utilization by scanning calendar events via Microsoft Graph with a managed identity.
Report room mailbox usage summary
Entra / Microsoft 365 · Exchange Online·A very simple script to show how to detect whether room mailboxes are being used.
Report send as audit events
Entra / Microsoft 365 · Compliance & audit·Example used in Chapter 20 of Office 365 for IT Pros to illustrate how to find and report SendAs audit events.
Report sensitivity label settings
Entra / Microsoft 365 · Compliance & audit·A script to report the settings of sensitivity labels.
Report sensitivity labels audit records
Entra / Microsoft 365 · Compliance & audit·Extracts audit events from the Office 365 audit log to generate a report.
Report service plans
Entra / Microsoft 365 · Licensing·Script to report the service plans found in subscriptions for a Microsoft 365 tenant.
Report service principal assignments
Entra / Microsoft 365 · Applications·Example script to demonstrate how to report the assignments of users and groups to Entra ID enterprise applications.
Report service principal connections
Entra / Microsoft 365 · Applications·Reading the Entra ID Sign in log to report on service principal sign-ins.
Report service principals with high permissions
Entra / Microsoft 365 · Applications·How to scan the assignments for highly-privileged Entra ID roles and report the service principals (apps).
Report shared mailbox licenses
Entra / Microsoft 365 · Licensing·A script to analyze shared mailboxes and report if they need licenses.
Report shared mailbox response times
Entra / Microsoft 365 · Exchange Online·This script demonstrates the principles behind generation of a report of response times for shared mailboxes in an Exchange Online environment.
Report SharePoint site retention
Entra / Microsoft 365 · Compliance & audit·Reports retention policies and rules that apply to SharePoint Online and OneDrive for Business locations in the tenant.
Report sharing audit events
Entra / Microsoft 365 · Compliance & audit·Example of extracting details of sharing events from the audit log to see what's going on.
Report sharing OneDrive files
Entra / Microsoft 365 · SharePoint & OneDrive·Report permissions for shared files found in OneDrive for Business accounts.
Report sites with default sensitivity labels
Entra / Microsoft 365 · SharePoint & OneDrive·Using PnP PowerShell to report on sites with default sensitivity labels.
Report SPO file versions
Entra / Microsoft 365 · SharePoint & OneDrive·Process and analyze the SharePoint Online file versions report to make the data easier to understand.
Report SPO files in document library
Entra / Microsoft 365 · SharePoint & OneDrive·Report files from a SharePoint Online document library using Microsoft Graph SDK cmdlets.
Report SPO retention policies
Entra / Microsoft 365 · Compliance & audit·Report SharePoint Online retention policies configured in the Microsoft Purview compliance center.
Report spo site storage usage
Entra / Microsoft 365 · SharePoint & OneDrive·Uses SharePoint Online and Exchange Online PowerShell modules.
Report spo site storage used graph
Entra / Microsoft 365 · SharePoint & OneDrive·A Graph-based script to report SharePoint Online Site Storage usage data.
Report stream audit events
Entra / Microsoft 365 · Compliance & audit·Report the audit events collected in the audit event log for Stream video creation and editing.
Report team private channel membership
Entra / Microsoft 365 · Teams·A script to report the membership of Teams private channels. This script is designed to be run by a tenant administrator or someone with the necessary permissions to access Teams data.
Report teams activity data
Entra / Microsoft 365 · Teams·Report the Teams usage data using the Microsoft Graph PowerShell SDK.
Report teams activity graph
Entra / Microsoft 365 · Teams·A sample script showing how to fetch per-team usage information from the Graph.
Report teams apps
Entra / Microsoft 365 · Applications·Report specific apps installed in Microsoft Teams.
Report teams channel email addresses
Entra / Microsoft 365 · Teams·A script to report the email addresses for Teams channels that are mail-enabled.
Report teams channels
Entra / Microsoft 365 · Teams·Report the set of channels existing in Teams for a tenant.
Report teams chat info
Entra / Microsoft 365 · Teams·Report Teams chat threads for the user signed into an interactive Microsoft Graph PowerShell session.
Report teams creationby email
Entra / Microsoft 365 · Teams·A script to locate Office 365 audit records for the creation of new Teams and report the fact via email.
Report teams emojis
Entra / Microsoft 365 · Teams·A quick and simple script to report the usage of emojis as reactions to Teams chat and channel conversation messages.
Report teams owners
Entra / Microsoft 365 · Teams·A quick script to show how to use the Microsoft Graph PowerShell SDK to generate a list of Teams and their owners.
Report teams policy assignments
Entra / Microsoft 365 · Teams·Generate a report about major Teams policies assigned to user accounts.
Report teams private channels
Entra / Microsoft 365 · Teams·Report the set of Teams private channels and their members for a tenant.
Report teams tags
Entra / Microsoft 365 · Teams·Report teams that have tags defined to tag members.
Report unused exo mailboxes
Entra / Microsoft 365 · Exchange Online·Find and report unused Exchange Online mailboxes.
Report user assigned licenses mg graph
Entra / Microsoft 365 · Licensing·Create a report of licenses assigned to Entra ID user accounts using the Microsoft Graph PowerShell SDK cmdlets.
Report user inbox count
Entra / Microsoft 365 · Users & guests·A script to show how to fetch mailbox folder statistics using a combination of PowerShell and the Microsoft Graph ListFolders API.
Report user membership of teams
Entra / Microsoft 365 · Teams·Use the Get-AssociatedTeam cmdlet to fetch and report team membership for individual user accounts.
Report user password changes
Entra / Microsoft 365 · Users & guests·Report user password settings including last password change dates, MFA enablement, registered authentication methods, and account activity.
Report user sign ins
Entra / Microsoft 365 · Users & guests·Report user sign ins with information about what apps are used based on what is available in the Entra Audit Sign-in Log.
Report user update audit records
Entra / Microsoft 365 · Compliance & audit·How to find unified audit records for user account update events and analyze what actions/changes.
Report users and managers
Entra / Microsoft 365 · Users & guests·A script to show how to create a report about the links between managers and employees stored in Azure AD.
Report weekly calendar for room mailboxes
Entra / Microsoft 365 · Exchange Online·Example script showing how to generate a weekly events report for room mailboxes.
Report weekly outstanding tasks
Entra / Microsoft 365 · Groups·This script generates a weekly report of incomplete tasks for a user and sends the list to them via email.
Report white board info
Entra / Microsoft 365 · Users & guests·How to use the Whiteboard Admin module to create a report of all whiteboards and their owners in a tenant. The original code.
Report yammer community activity
Entra / Microsoft 365 · Exchange Online·Report the activity of Yammer communities (for networks configured in Microsoft 365 mode) using the compliance records stored in Exchange Online.
Restore deleted Entra ID groups
Entra / Microsoft 365 · Groups·A script to show how to restore deleted Entra ID groups (Microsoft 365 and security groups) using the Microsoft Graph PowerShell SDK.
Restore deleted Entra user with new UPN
Entra / Microsoft 365 · Users & guests·Restores a soft-deleted Entra ID user account and assigns a new user principal name, reconciling proxy address conflicts when needed.
Search and remove mailbox calendar items
Entra / Microsoft 365 · Exchange Online·Uses Search-Mailbox to find and remove calendar items from user mailboxes within a defined date range.
Search unified audit log with Graph
Entra / Microsoft 365 · Compliance & audit·Creates and polls a Microsoft Graph audit log query, then exports matching unified audit records for review.
Send azure communications email
Entra / Microsoft 365 · Exchange Online·An example script to show how to send email from Azure Communication Services using PowerShell.
Send email exchange hve
Entra / Microsoft 365 · Exchange Online·Example script that sends mail through the Exchange Online High Volume Email (HVE) service.
Send HVE email via runbook
Entra / Microsoft 365 · Exchange Online·Using an Azure Automation runbook to send email via the Exchange Online High Volume Email.
Send message about deleted stream videos
Entra / Microsoft 365 · Compliance & audit·A script to show how to report videos waiting in the Stream recycle bin and send the report to an administrator account.
Send teams chat message
Entra / Microsoft 365 · Teams·Use the Microsoft Graph PowerShell SDK to send a message to a Teams chat.
Send Teams chat with many mentions
Entra / Microsoft 365 · Teams·Demonstrates sending a Teams chat via Microsoft Graph with multiple @mentions, emojis, and inline images.
Send welcome email
Entra / Microsoft 365 · Exchange Online·How to send a welcome message to new mailboxes using SMTP AUTH.
Send welcome email graph
Entra / Microsoft 365 · Exchange Online·Sends welcome mail to newly created mailboxes using Microsoft Graph mail send with an app registration.
Send welcome email mg
Entra / Microsoft 365 · Exchange Online·How to send a welcome message to new mailboxes using the Send-MgUserMessage cmdlet from the Microsoft Graph SDK for PowerShell.
Send welcome email runbook
Entra / Microsoft 365 · Exchange Online·Example of how to send email using the Microsoft Graph SDK for PowerShell via an Azure Automation account runbook.
Send welcome email to new mailboxes
Entra / Microsoft 365 · Exchange Online·Finds recently created Exchange mailboxes and sends each new user a welcome message using SMTP AUTH.
Send welcome message user mail
Entra / Microsoft 365 · Exchange Online·How to send a welcome message to new mailboxes using the Send-MgUserMail cmdlet from the Microsoft Graph SDK for PowerShell.
Send welcome message with calendar events
Entra / Microsoft 365 · Exchange Online·A script to send a welcome message to new user accounts, complete with an attachment to welcome the new account.
Send welcome message with ics
Entra / Microsoft 365 · Exchange Online·Sends welcome mail to new users with attachments and ICS files for upcoming corporate events, using app-only Graph.
Send welcome new user messages hve
Entra / Microsoft 365 · Exchange Online·The classic send new welcome messages reprised for Exchange Online High-Volume Email.
Set auto reply teams groups
Entra / Microsoft 365 · Teams·Sets an auto-reply message on team-enabled Microsoft 365 groups using Graph and Exchange Online PowerShell.
Set intelligent versioning one drive sites
Entra / Microsoft 365 · SharePoint & OneDrive·Set intelligent (automatic) versioning for OneDrive for Business sites for user accounts with SharePoint Online Plan 1 or Plan 2 licenses.
Sketch pad
Entra / Microsoft 365 · Users & guests·Scratch script with experimental PowerShell snippets for Graph, Exchange, and SharePoint tasks under development.
Switch licenses
Entra / Microsoft 365 · Licensing·Switch licenses for a set of Entra ID user accounts. This example shows the processing to switch user accounts.
Switch litigation holds to eDiscovery
Entra / Microsoft 365 · Compliance & audit·Moves mailboxes on litigation hold into an eDiscovery case hold, then removes the original litigation holds once the case hold is active.
Switch litigation holds to retention
Entra / Microsoft 365 · Compliance & audit·Moves mailboxes on litigation hold onto a Microsoft 365 retention policy and clears the litigation holds afterward.
Sync M365 group with security group
Entra / Microsoft 365 · Groups·Synchronizes membership between a Microsoft 365 group and a security group, adding and removing members to match.
Teams creation report by email
Entra / Microsoft 365 · Teams·A script to locate Office 365 audit records for the creation of new Teams and report the fact via email.
Teams groups activity report
Entra / Microsoft 365 · Teams·A script to check the activity of Microsoft 365 Groups and Teams and report the groups and teams that might be deleted because they're not used.
Teams groups activity report v5
Entra / Microsoft 365 · Teams·A script to check the activity of Microsoft 365 Groups and Teams and report the groups and teams that might be deleted because they're not used.
Test batch processing
Entra / Microsoft 365 · Exchange Online·A script to demonstrate how to use batch processing with Microsoft Graph API by using mailboxes fetched from Exchange.
Test compliance holds
Entra / Microsoft 365 · Compliance & audit·Test the Invoke-HoldRemovalAction cmdlet.
Update app lock instance
Entra / Microsoft 365 · Applications·Update Entra ID applications that don't have app instance lock set.
Update azure automation graph modules
Entra / Microsoft 365 · Applications·A script to update the set of Graph modules for an Azure Automation account.
Update banned passwords list
Entra / Microsoft 365 · Users & guests·This script updates the list of banned passwords in Microsoft Entra ID (Azure AD) using the Microsoft Graph PowerShell SDK.
Update break glass users ca policies
Entra / Microsoft 365 · Conditional Access·Make sure that our break glass users are excluded from every CA policy that's active in the organization.
Update domain blocks
Entra / Microsoft 365 · Exchange Online·Reads domain block instructions from a SharePoint list and applies tenant allow/block lists plus Exchange transport rules.
Update group photos sdk
Entra / Microsoft 365 · Groups·Example script to show how to check the photos for Microsoft 365 Groups against a list of approved photos.
Update guest photos
Entra / Microsoft 365 · Users & guests·Updates profile photos for Entra ID guest accounts from image files stored in a local folder named after each guest.
Update M365 group owners
Entra / Microsoft 365 · Groups·Script showing how to remove a user as the owner of Microsoft 365 groups and replace them with another user.
Update mailbox auditing
Entra / Microsoft 365 · Exchange Online·A script to update Office 365 E3 user and shared mailboxes and make sure that they are enabled for mailbox auditing.
Update managers
Entra / Microsoft 365 · Users & guests·A script to explore how to keep manager-employee assignments updated.
Update microsoft irmca policies
Entra / Microsoft 365 · Conditional Access·Update conditional access policies to make sure that they exclude the Microsoft Rights Management Services app.
Update Office 365 PowerShell modules
Entra / Microsoft 365 · Users & guests·Checks for updates to common Office 365 management modules and installs newer versions, pruning older module builds.
Update one drive group members
Entra / Microsoft 365 · SharePoint & OneDrive·Sample script that uses group membership to assign OneDrive for Business storage quotas from a CSV allocation file.
Update OneDrive retention labels
Entra / Microsoft 365 · Compliance & audit·Updates assigned retention labels on selected files in a user's OneDrive for Business account based on a file report.
Update outlook signature
Entra / Microsoft 365 · Users & guests·Example script that builds and applies an Outlook desktop signature from Azure AD user properties and registry settings.
Update owa signatures
Entra / Microsoft 365 · Users & guests·Update the OWA signature data for all mailboxes to make sure that they comply with company rules.
Update Planner plan from message center
Entra / Microsoft 365 · Groups·Reads Microsoft 365 message center notifications and creates or updates tasks in a Planner plan owned by a group.
Update pseudo-dynamic M365 group in Automation
Entra / Microsoft 365 · Groups·Maintains a pseudo-dynamic Microsoft 365 group in Azure Automation by adding managers and removing users who no longer qualify.
Update retention policy shared mailboxes
Entra / Microsoft 365 · Compliance & audit·Updates a Microsoft 365 retention policy for shared mailboxes by adding new shared mailboxes and removing retired ones.
Update sensitivity labels
Entra / Microsoft 365 · Compliance & audit·Applies or replaces sensitivity labels on files in a SharePoint document library, respecting label priority and optional removal.
Update sensitivity labels for groups
Entra / Microsoft 365 · Compliance & audit·A script to remap the sensitivity labels assigned to groups so that only labels with container settings are used.
Update spo sites with labels
Entra / Microsoft 365 · SharePoint & OneDrive·A script to check SharePoint Online team sites created for Microsoft 365 Groups that don't seem to have received sensitivity labels.
Update static retention policy in Automation
Entra / Microsoft 365 · Compliance & audit·Azure Automation runbook that uses a managed identity to update a static Microsoft 365 retention policy for SharePoint sites.
Update subscribers in groups used by teams
Entra / Microsoft 365 · Teams·Update the subscriber list for Teams-enabled groups so that members receive calendar updates.
Update tenant custom branding
Entra / Microsoft 365 · Users & guests·A runbook to update the tenant's sign-in text and background image when the year changes.
Update user photos
Entra / Microsoft 365 · Users & guests·A script to illustrate how to update user photos in Microsoft 365 accounts.
Upload large attachment chunks
Entra / Microsoft 365 · Exchange Online·An example to show how to upload a large attachment in byte chunks for a draft message and then send the message.
Upload many attachments to a message
Entra / Microsoft 365 · Exchange Online·Uploading and sending many attachments with a mail message.