PowerShell examples for articles published on https://office365itpros.com and https://practical365.com. See https://o365itpros.gumroad.com/l/M365PS for the Automating Microsoft 365 with PowerShell eBook (included in the Office 365 for IT Pros bundle https://gum.co/O365IT/) https://office365itpros.com
Find a file
2026-06-08 12:01:24 +01:00
.github Update 2025-10-07 10:10:38 +01:00
.vscode Update 2025-10-07 10:10:38 +01:00
Office 365 for IT Pros Update 2025-03-27 17:08:20 -07:00
Add-ContactsToMailboxes.PS1 Add check for hash table to deal with multiple contacts with the same email address 2024-09-20 14:25:04 +01:00
Add-OwnerstoApps.PS1 Fix spelling error 2025-04-13 18:06:04 +01:00
AddTeamstoGroupsExpirationPolicy.ps1 Update 2023-09-28 16:20:38 +01:00
Analyze-ExternalCalendarMeetings.PS1 v1.01 20-Aug-2025 2025-08-20 22:41:43 +01:00
Analyze-MailTraffic.PS1 Update 2025-09-24 10:30:10 +01:00
Analyze-MailTrafficUsers.PS1 Update to avoid throttling. 2026-04-23 13:11:51 +01:00
Analyze-MailTrafficWithGraph.PS1 V1.0 23-Jan-2026 2026-01-23 15:51:35 +00:00
Analyze-MTHistoricalLogs.PS1 Update 2025-09-24 18:59:14 +01:00
Analyze-TeamsExternalChats.PS1 Fix spelling error 2024-02-01 09:10:17 +00:00
Analyze-TeamsMeetings.PS1 V2.0 2026-04-10 12:52:35 +01:00
AnalyzeSendAsAuditData.ps1 Update 2025-02-27 13:07:32 +00:00
AnalyzeSensitivityLabelUsage.PS1 Update AnalyzeSensitivityLabelUsage.PS1 2022-11-14 13:14:39 +00:00
Apply-ExcludeAllHoldstoInactiveMailboxes.PS1 Added GitHub link 2025-12-11 15:24:13 +00:00
Apply-SensitivityLabels.PS1 Update 2025-05-09 16:11:44 +01:00
ArchiveMicrosoft365Groups.PS1 Update ArchiveMicrosoft365Groups.PS1 2022-03-06 16:32:07 +00:00
Assign-LicensesViaCSV.PS1 Update to fix bug with closing } 2024-01-02 19:11:18 +00:00
Assign-MultipleLicenses.PS1 Update Assign-MultipleLicenses.PS1 2023-09-18 22:22:27 +01:00
AssignColorsSensitivityLabels.PS1 Script to demonstrate sensitivity label colors 2022-10-24 15:39:38 +01:00
AssignLocalLanguageStringsSensitivityLabels.PS1 Added Arabic as another example. 2023-02-20 14:45:10 +00:00
AuditRecordAuditLabel.PS1 Update 2024-12-24 12:56:33 +00:00
AuditRecordsTeamsMeetings.PS1 Update 2024-05-28 10:22:46 +01:00
AuditRecordsTeamsRecordingsUploads.PS1 Update 2024-06-05 21:45:09 +01:00
AuditSPOOperationsByUser.PS1 Update AuditSPOOperationsByUser.PS1 2021-01-18 14:55:29 +00:00
Auto-ApplyRetentionLabels.PS1 V1.0 2024-12-23 16:06:37 +00:00
AzureAutomation-FindRemoveTeamsChats.PS1 Update 2026-06-05 16:42:16 +01:00
AzureAutomationAddMembersTeamChannels.PS1 Update AzureAutomationAddMembersTeamChannels.PS1 2022-08-18 16:47:28 +01:00
AzureAutomationGroupsExpirationReport.PS1 Update 2024-04-21 01:19:47 +01:00
Check-AuditRecordsMFA.PS1 Update to fetch 10,000 audit records 2024-11-15 13:52:55 +00:00
Check-CopilotLicenseDetails.PS1 Update 2025-10-09 13:36:04 +01:00
Check-SensitivityLabelsGroups.PS1 Update 2024-01-05 21:44:58 +00:00
Check-SharedMailboxes.PS1 Update for #123 2025-10-07 10:41:19 +01:00
Check-SharedMailboxesForMDO.PS1 V1.0 14-Nov-2025 2025-11-14 22:22:20 +00:00
Check-SharedMailboxQuotas.PS1 Merge branch 'master' of https://github.com/12Knocksinna/Office365itpros 2023-09-26 19:15:59 +01:00
Check-SignInsUtilityAccounts.PS1 Update 2025-07-15 13:23:16 +01:00
CheckAuditEventsRunbook.PS1 Use more elegant method to connect to the Graph 2023-02-02 16:05:55 +00:00
CheckRetentionPolicyUpdates.PS1 Update CheckRetentionPolicyUpdates.PS1 2021-07-27 18:56:05 +01:00
CleanUpMailbox-Graph.PS1 V1.1 21-May-2026 2026-05-21 18:40:40 +01:00
ComplianceSearchPartiallyIndexedItems.ps1 Update ComplianceSearchPartiallyIndexedItems.ps1 2021-01-18 14:55:52 +00:00
Convert-AccountToInternal.PS1 Update 2024-03-20 13:40:07 +00:00
Convert-TeamsBackgroundFilesV2.PS1 Change split method 2023-10-04 17:05:58 +01:00
ConvertDDLM365Group.PS1 Update ConvertDDLM365Group.PS1 2022-03-13 21:07:08 +00:00
ConvertDLtoO365Group.PS1 Update ConvertDLtoO365Group.PS1 2022-04-21 22:56:29 +01:00
ConvertMailContactsGuests.PS1 Update ConvertMailContactsGuests.PS1 2023-10-05 15:24:36 +01:00
Copy-GroupsFromOneUsertoAnother.PS1 Update Copy-GroupsFromOneUsertoAnother.PS1 (#133) 2025-08-14 09:17:17 +01:00
Create-DDLBasedOnSMTPAddresses.PS1 Change to DDL alias 2023-11-22 21:27:54 +00:00
Create-EntraIDDynamicAUs.PS1 Uopdate with SDK production cmdlets 2025-05-23 16:39:36 +01:00
Create-EntraIDDynamicGroups.PS1 Initial version 2023-10-04 17:02:48 +01:00
Create-NewConditionalAccessPolicy.PS1 Updates 2023-12-20 13:41:59 +00:00
Create-NewsItemsFromRSSFeed.PS1 V1.0 2025-01-19 21:07:11 +00:00
CreateCSVFilesForSKUsAndServicePlans.PS1 Update 2026-05-19 10:34:28 +01:00
CreateNewAzureADAccount.PS1 Create CreateNewAzureADAccount.PS1 2022-11-22 10:34:28 +00:00
DecryptProtectedSPODocuments-Graph.PS1 Update DecryptProtectedSPODocuments-Graph.PS1 2023-01-30 20:14:21 +00:00
DecryptProtectedSPODocuments.PS1 Update DecryptProtectedSPODocuments.PS1 2021-01-18 14:57:01 +00:00
Disable-CopilotStudio.PS1 Update 2025-05-16 17:28:11 +01:00
Disable-EntraApp.PS1 V1.0 4-Feb-2026 2026-02-04 21:52:25 +00:00
Disable-JunkEmailOptions.PS1 Update 2024-01-02 20:39:06 +00:00
Disable-PowerShellAdmins.PS1 Update permissions 2024-08-15 15:22:35 +01:00
Enable-AllExchangeAuditEvents.PS1 Update 2024-12-24 12:56:33 +00:00
EnableMicrosoft365GroupCreationControl.PS1 Updated for Graph SDK 2023-10-17 16:01:07 +01:00
Export-WordtoPDF.PS1 Update 2026-01-30 10:51:28 +00:00
FetchServiceMessagesGraph.ps1 Update 2024-02-05 18:41:34 +00:00
Find-AddMemberEvents.PS1 Update Find-AddMemberEvents.PS1 2024-04-03 18:19:14 +01:00
Find-AuditEventsForUser.PS1 Fixed Base64 read against GUID 2024-12-03 08:38:10 +00:00
Find-CandidateCopilotUsers.PS1 Change to SDK cmdlet 2025-08-26 12:53:07 +01:00
Find-ConnectionsM365AdminCenter.PS1 Add GitHub link to V1.0 2024-11-16 14:23:42 +00:00
Find-CopilotAuditRecords.PS1 Update 2025-01-27 16:36:27 +00:00
Find-CopilotInteractions-Graph.PS1 V2.0 2026-06-04 18:51:51 +01:00
Find-DevicesFromSignInLog.PS1 Change Graph permissions 2024-03-08 00:09:21 +00:00
Find-FilesWithDownGradedLabels.PS1 Added $AuditData.Sensitivitylabeleventdata.LabelEventType to gthe output 2024-11-20 11:17:51 +00:00
Find-GraphPermissions..PS1 Update 2024-02-21 18:29:32 +00:00
Find-GroupsNoOwnersOrMembers.PS1 Fix #118 2024-09-05 21:38:00 +01:00
Find-InActiveDLs90.PS1 Update 2024-03-07 23:01:55 +00:00
Find-InactiveEmailUsers.PS1 Add output file (Excel or CSV) 2024-12-05 14:01:11 +00:00
Find-InactiveGuestsWithAudit.ps1 Update 2025-10-11 22:24:41 +01:00
Find-InactiveLicensedUserAccounts.PS1 Update 2026-06-08 11:10:39 +01:00
Find-InactiveTeamsChannels.PS1 Update 2026-06-07 14:45:20 +01:00
Find-JunkEmailDomains.PS1 Update 2025-10-16 10:31:54 +01:00
Find-LastAccessedDateDocuments.PS1 V1.2 2024-11-15 17:15:21 +00:00
Find-LoopAppUsers.PS1 Update 2024-03-26 22:51:49 +00:00
Find-ObsoleteSPOSites.PS1 Remove need for Group.Read.All permission 2026-04-17 15:29:17 +01:00
Find-TargetedCollectionFolders.PS1 Update Find-TargetedCollectionFolders.PS1 2023-06-28 13:37:04 +01:00
Find-TeamsChannelsWithWebSites.PS1 Check both website link types 2024-01-26 08:01:12 +00:00
Find-TeamsForUser.PS1 Update 2026-03-09 17:12:32 +00:00
Find-UnderusedCopilotLicenses.PS1 Update 2025-03-05 21:05:06 +00:00
Find-UnderUsedCopilotLicenseswithAudit.PS1 Update 2026-01-27 18:22:10 +00:00
Find-UnusedProxyAddresses-10days.PS1 Update 2025-09-24 18:59:14 +01:00
Find-UnusedProxyAddresses-90days.PS1 Update 2025-09-27 12:03:01 +01:00
Find-UnusedServicePrincipals.PS1 Added some progress messages 2024-11-21 09:23:52 +00:00
FindAccountsWithForwarding.PS1 Update 2025-10-16 10:36:14 +01:00
FindAppConsentGrants.PS1 Update 2023-12-14 12:56:35 +00:00
FindAzureADDirectConnectSignIns.PS1 Update for SDK V2 2024-03-04 16:18:44 +00:00
FindBadGuestsFromBlockedDomains.PS1 Update FindBadGuestsFromBlockedDomains.PS1 2023-08-18 20:39:23 +01:00
FindCrucialSendAndSearchRecords.PS1 Update FindCrucialSendAndSearchRecords.PS1 2021-01-18 14:57:55 +00:00
FindDeletedEmailAuditRecords.PS1 Update FindDeletedEmailAuditRecords.PS1 2023-08-18 20:40:06 +01:00
FindInactiveDLs.PS1 V2.0. Add message tracescan for full 90 days 2026-06-07 14:27:56 +01:00
FindMailItemsAccessedAuditRecords.PS1 Add output file (Excel or CSV) 2024-12-05 14:01:11 +00:00
FindNonSSPREnabledUsers.PS1 Update FindNonSSPREnabledUsers.PS1 2022-11-01 11:09:49 +00:00
FindObsoleteGuestsByActivity.ps1 Update FindObsoleteGuestsByActivity.ps1 2021-01-18 14:59:01 +00:00
FindObsoleteGuestsByActivityV2.ps1 Update 2024-03-29 22:09:26 +00:00
FindObsoleteGuestsByActivityV3.PS1 Fixed for Graph SDK V2 2023-10-24 11:59:27 +01:00
FindOffice365GroupsWithBadGuests.PS1 Update FindOffice365GroupsWithBadGuests.PS1 2021-01-18 14:59:42 +00:00
FindOldGuestAccounts.PS1 Updated to use SDK cmdlets entirely 2024-09-18 17:18:32 +01:00
FindOldGuestUsers.ps1 Update FindOldGuestUsers.ps1 2025-10-06 09:48:18 +01:00
FindOrphanOneDriveSites.PS1 V2.0 - Updated to Graph SDK 2025-05-13 14:49:26 +01:00
FindPotentialDirectoryProblems.PS1 Fix bug 2025-02-04 16:16:48 +00:00
FindReportGuestsAddedTeams.PS1 Added checks for modules 2023-08-14 15:52:10 +01:00
FindSendAsAuditRecords.ps1 Update FindSendAsAuditRecords.ps1 2021-01-18 15:02:47 +00:00
FindTabsAndAppsInTeams.ps1 Update FindTabsAndAppsInTeams.ps1 2023-01-19 17:34:46 +00:00
FindTeamChannelsWithWiki.PS1 Update 2024-01-22 18:15:09 +00:00
FindUpdatedOffice365Notifications.ps1 Update FindUpdatedOffice365Notifications.ps1 2021-01-18 15:03:47 +00:00
FindUserAuditActivities.PS1 Update FindUserAuditActivities.PS1 2023-03-14 17:52:29 +00:00
FindWhenAnonymousLinkUsed.ps1 Update FindWhenAnonymousLinkUsed.ps1 2021-01-18 15:04:14 +00:00
FindWhoAddedGuestsToGroups.ps1 Update FindWhoAddedGuestsToGroups.ps1 2021-01-18 15:04:35 +00:00
FindWhoCreatedGuestsThroughSPOSharing.ps1 Update FindWhoCreatedGuestsThroughSPOSharing.ps1 2021-01-24 15:12:12 +00:00
Fix-ProxyEmailAddresses.PS1 V1.0 2025-03-14 21:27:43 +00:00
GenerateTeamsDirectory-Graph.Ps1 Switch from Get-MgGroup to Get-MgTeam 2022-11-07 17:59:06 +00:00
GenerateTeamsDirectory.ps1 Added deeplink to output 2023-10-19 18:11:12 +01:00
Get-AuditRecordsTaggedSPOFiles.PS1 Updated with GitHub link 2024-12-24 12:58:09 +00:00
Get-CopilotAuditRecords.PS1 Uopdate 2024-12-04 19:30:45 +00:00
Get-GraphPermission.PS1 Removed duplicate cmdlets in output 2024-01-11 16:04:53 +00:00
Get-GraphUserStatistics.PS1 Update 2025-10-20 23:27:21 +01:00
Get-IPGeolocation.ps1 Update Get-IPGeolocation.ps1 2023-03-13 10:45:50 +00:00
Get-LabelsAndCheckMicrosoft365Groups.PS1 Update 2024-10-24 17:57:06 +01:00
Get-LargeMailboxItems.PS1 V1.0 2026-01-16 14:49:25 +00:00
Get-MgAuditRecords.PS1 Update 2025-01-07 11:32:58 +00:00
Get-ServiceAlertsGraph.ps1 Update 2025-02-15 16:53:13 +00:00
Get-ServiceHealthInformation.PS1 V1.1 2026-02-10 17:10:17 +00:00
Get-TenantUserCount.PS1 Updated with proper code 2025-12-08 13:28:30 +00:00
Get-UsersWithPhoneMFAMethod.PS1 V1.0 2025-02-06 21:00:42 +00:00
GetAzureADAccessReviewDetailsGraph.PS1 Update GetAzureADAccessReviewDetailsGraph.PS1 2023-07-19 16:48:03 +01:00
GetBingImagesTeamsBackgrounds.PS1 Update GetBingImagesTeamsBackgrounds.PS1 2023-09-28 16:00:43 +01:00
GetGraphUserStatisticsReport.PS1 Update 2025-10-08 11:27:52 +01:00
GetHoldsOnMailbox.PS1 Update GetHoldsOnMailbox.PS1 2021-01-18 15:12:36 +00:00
GetLastActiveTimeMailboxes.PS1 Update GetLastActiveTimeMailboxes.PS1 2021-01-18 15:14:42 +00:00
GetPlansForUser-DeviceCode.PS1 Update GetPlansForUser-DeviceCode.PS1 2021-01-18 15:15:24 +00:00
GetPlansForUser.PS1 Update GetPlansForUser.PS1 2021-01-18 15:15:54 +00:00
GetPowerAutomateFlows.PS1 Update GetPowerAutomateFlows.PS1 2022-02-14 22:55:36 +00:00
GetServicePrincipalSignIns-Graph.PS1 Update GetServicePrincipalSignIns-Graph.PS1 2022-01-29 23:53:00 +00:00
GetTeamsReactions.PS1 Update to deal with records for removed/updated emojis 2023-01-26 14:35:50 +00:00
GetTenantFeatureUpdatesGraph.PS1 Update GetTenantFeatureUpdatesGraph.PS1 2021-07-07 22:48:05 +01:00
GetUserSignInDataGraph.PS1 Update 2023-10-25 19:34:05 +01:00
GetUserSignInDataGraphSDK.PS1 Update 2023-10-25 19:34:05 +01:00
HideGroupsUsedByTeams.PS1 Updated for 2023 2023-10-17 23:23:03 +01:00
LastLoggedOnByExternalUsers.ps1 Update LastLoggedOnByExternalUsers.ps1 2021-01-18 15:17:19 +00:00
LICENSE Create LICENSE 2023-05-31 17:12:35 +01:00
MailTrafficStatistics.PS1 Update MailTrafficStatistics.PS1 2021-04-26 22:55:09 +01:00
MFAReportMailboxes.ps1 Update MFAReportMailboxes.ps1 2021-01-18 15:17:42 +00:00
Migrate-UserProfileCardSettings.PS1 V1.0 2025-09-03 19:20:45 +01:00
Monitor-TeamsMemberAdditions.PS1 Added final details 2023-09-26 19:20:58 +01:00
New-AccountTrackingAzureAutomation.PS1 Update 2025-01-24 15:41:44 +00:00
New-RetentionPolicySharedMaiboxes.PS1 V1.0.1 2-August-2025 2025-08-02 18:22:41 +01:00
New-TeamsChannelMeeting.PS1 Update 2026-01-16 14:47:53 +00:00
Populate-TeamsDirectorySPOList-Graph.PS1 Updated to fix bugs 2023-10-31 20:31:48 +00:00
Populate-TeamsDirectorySPOList-Pnp.PS1 Update Populate-TeamsDirectorySPOList-Pnp.PS1 2023-10-21 17:05:29 +01:00
Populate-TeamsExternalAccess.PS1 Update 2024-04-08 16:49:47 +01:00
PopulateOrgContacts.PS1 Make check for existing mailbox contact better 2023-02-11 21:12:09 +00:00
PopulateTeamSharedChannel.PS1 Update PopulateTeamSharedChannel.PS1 2022-08-08 13:33:27 +01:00
PopulateTeamsHolidays.PS1 Create PopulateTeamsHolidays.PS1 2022-11-29 20:54:33 +00:00
Post-ItemsToHTTPWorkFlow.PS1 V1.0 for article 2024-06-12 17:47:22 +01:00
PostNewMicrosoft365RoadmapItems.ps1 Update 2023-11-06 14:39:43 +00:00
Process-ExpiryGuestAccounts.PS1 Update Process-ExpiryGuestAccounts.PS1 2023-05-08 21:11:07 +01:00
Provision-OneDriveAccounts.PS1 Update 2024-06-07 21:38:10 +01:00
Purge-ComplianceSearchItems.PS1 Update 2025-04-02 10:45:32 +01:00
PurgeMessagesWithContentSearch.PS1 Update 2024-01-04 13:28:47 +00:00
PurgeMessagesWithSearchMailbox.PS1 Refine output 2024-01-04 15:25:59 +00:00
Query-CopilotGraph.PS1 V1.0 23-Feb-2026 2026-02-23 16:15:09 +00:00
README.md Update README with new eBook link 2025-10-07 10:28:11 +01:00
Remove-InactiveUserAccounts.PS1 Update 2025-11-11 16:28:20 +00:00
Remove-LicensesDisabledAccounts.PS1 Merge branch 'master' of https://github.com/12Knocksinna/Office365itpros 2023-10-05 21:51:38 +01:00
Remove-Microsoft365UserAccount.PS1 Update 2024-07-24 20:20:45 +01:00
Remove-ObsoleteMobileDevices.PS1 V1.01 15-Aug-2025 2025-08-15 12:49:53 +01:00
Remove-PermissionsSharedMailbox.PS1 Update - Ready for initial release 2023-11-21 21:54:31 +00:00
Remove-PostsTeamChannel.PS1 Update 2024-08-08 23:00:45 +01:00
Remove-UtilityMessagesFromMailboxes.PS1 Adjust date range for filter 2024-09-01 23:55:36 +01:00
RemoveKaizalaServicePlans.PS1 Update 2024-10-24 11:37:56 +01:00
RemoveServicePlan-MgGraph.PS1 Update RemoveServicePlan-MgGraph.PS1 2021-11-16 16:16:52 +00:00
RemoveServicePlan.PS1 Update to say that modules are now deprecated 2024-04-10 17:58:18 +01:00
RemoveServicePlan2.PS1 Update to say that modules are now deprecated 2024-04-10 17:58:18 +01:00
RemoveServicePlan3.PS1 Added link to article 2024-04-23 08:28:50 +01:00
RemoveVivaEngageCoreServicePlan.PS1 Update 2023-11-02 21:54:36 +00:00
RenameMicrosoft365GroupsNamingPolicy.PS1 Update RenameMicrosoft365GroupsNamingPolicy.PS1 2021-01-18 15:21:02 +00:00
Report-ActivityAlertAuditEvents.PS1 Update 2025-02-15 17:02:55 +00:00
Report-AdaptiveScopes.PS1 V1.0 2026-01-28 20:22:25 +00:00
Report-AllEmailProxyAddresses.PS1 Update 2023-11-14 15:22:42 +00:00
Report-AppAuditEvents.PS1 V1.0.7 2025-06-15 14:09:15 +01:00
Report-AppsAndServicePrincipals.PS1 Add Mail-Advanced.ReadWrite.All to permissions 2026-03-24 10:54:48 -07:00
Report-AuditEventsviaEmailRunbook.PS1 Update 2025-02-24 15:46:32 +00:00
Report-AURolesAndMembers.PS1 Update for SDK V2.9 2023-11-14 18:35:56 +00:00
Report-CalendarItems.PS1 V1.0 2025-04-02 16:16:56 +01:00
Report-ComplianceCaseHolds.PS1 V1.0 2023-12-12 20:22:21 +00:00
Report-ComplianceRoleGroups.PS1 V1.0 9-Nov-2025 2025-11-09 21:49:27 +00:00
Report-ConditionalAccessPolicies.PS1 Updates 2024-01-02 18:07:16 +00:00
Report-ContainerManagementLabels.PS1 Update 2026-03-20 15:59:50 +00:00
Report-CopilotInteractions.PS1 Script doesn't work anymore because of a Graph block 2026-05-29 22:24:26 +01:00
Report-CopilotLicensedUsers.PS1 [WIP] Add documentation for Copilot licensing in tenant (#148) 2025-12-08 13:15:43 +00:00
Report-CopilotUsageWithUserDetail.PS1 Update 2025-12-08 13:17:59 +00:00
Report-DailySignIns.PS1 V1.0 2025-11-16 23:29:00 +00:00
Report-DelegatedPermissions.PS1 Update 2025-06-24 10:46:51 +01:00
Report-DelegatedPermssions.PS1 Update 2025-02-14 18:10:20 +00:00
Report-DeletedEntraIDObjects.PS1 Update 2026-03-20 15:59:50 +00:00
Report-EnforcedTimeStamps.PS1 V1.0 2025-12-12 17:36:08 +00:00
Report-EntraGroupInsights.PS1 V1.0 2026-03-31 18:56:26 +01:00
Report-EntraIDGoveranceCosts.PS1 V1.0.2 24-Jul-2025 2025-07-24 22:48:37 +01:00
Report-EntraIDGuestSponsors.PS1 V1.0 2025-04-16 18:28:20 +01:00
Report-EntraRegisteredDevices.PS1 Update 2025-06-05 10:05:28 +01:00
Report-ExoMailboxFolderStats.PS1 Update ArchiveSize to 0 to stop formatting error 2024-08-08 23:05:19 +01:00
Report-ExpiringAppSecrets.PS1 Update 2025-10-18 10:42:10 +01:00
Report-ExpiringPasswords.PS1 Update 2024-04-22 19:25:38 +01:00
Report-ExternalTenantAccessbyGuests.PS1 V1.0 2025-12-05 13:14:03 +00:00
Report-FileSharingAuditEvents.PS1 First version 2025-04-20 23:40:03 +01:00
Report-GroupBasedLicenseCounts.PS1 V10 Final 2025-02-25 18:33:40 +00:00
Report-GroupsTeamsActivity.PS1 Add Excel/CSV reports 2024-08-15 15:51:29 +01:00
Report-HardDeletedUserAccounts.PS1 V1.0 2025-02-10 19:14:12 +00:00
Report-InactiveTeamsByEmail.PS1 Update 2025-02-24 15:46:32 +00:00
Report-IndividualUserSessions.PS1 V1.0 2025-07-24 16:46:34 +01:00
Report-iOSDevicesAuthenticator.PS1 Merge branch 'master' of https://github.com/12Knocksinna/Office365itpros 2025-07-13 23:06:19 +01:00
Report-LabelChangesAuditRecords.PS1 First version 2024-07-14 12:47:43 +01:00
Report-LastAppAccessedByUsers.PS1 Add check to ensure email address is valid 2025-09-02 22:49:18 +01:00
Report-LastSuccessfulSignIn.PS1 Update Report-LastSuccessfulSignIn.PS1 2023-12-07 12:30:19 +00:00
Report-LoopWorkspaces.PS1 Update 2025-05-16 17:28:11 +01:00
Report-MailboxAuditingConfiguration.PS1 Update Report-MailboxAuditingConfiguration.PS1 (#121) 2024-09-05 21:32:28 +01:00
Report-MailboxesEnabledForEWS.PS1 V1.0 2025-02-19 22:47:26 +00:00
Report-MailboxMessagesSDK.PS1 Replace function with new version 2025-05-29 11:39:12 +01:00
Report-MailboxSizes.PS1 Update 2024-04-03 15:58:53 +01:00
Report-MailUsageDomains.PS1 Add check against UPN if Mail is blank 2023-08-17 10:46:41 +01:00
Report-ManagedIdentityPermissions.PS1 Add GitHub link 2024-02-01 14:53:20 +00:00
Report-ManagersAndDirectReportsGraph.PS1 V1.0 21-Feb-2026 2026-02-21 16:40:45 +00:00
Report-Microsoft365GroupsExpiration.PS1 V1.0 2024-11-21 21:15:24 +00:00
Report-MobileDevices.PS1 Updated 2023-12-02 17:08:21 +00:00
Report-MRMTagsOnFolders.PS1 Update Report-MRMTagsOnFolders.PS1 2023-07-28 17:35:27 +01:00
Report-NonMFASignIns.PS1 V1.0 15-Aug-2025 2025-08-15 12:46:33 +01:00
Report-NonUserAuditEvents.PS1 Update 2026-05-07 14:32:24 +01:00
Report-OneDriveFiles.PS1 Update 2025-07-18 15:42:42 +01:00
Report-OneDriveUsage.PS1 Update cmdlets to use the v1.0 endpoint 2025-10-25 21:45:13 +01:00
Report-PermissionConsentRequests.PS1 Add link to article 2025-06-19 10:24:07 +01:00
Report-PIMRoleAssignmentsByEmail.PS1 Update 23-Jan-2026 2026-01-23 15:24:14 +00:00
Report-Plans.PS1 Add some extra stats 2024-06-12 16:13:48 +01:00
Report-PrimaryArchiveFolderSizes.ps1 Create Report-PrimaryArchiveFolderSizes.ps1 (#112) 2024-06-26 22:29:56 +01:00
Report-PriorityCleanupSPOAuditRecords.PS1 V1.0 2025-12-03 12:25:17 +00:00
Report-RecentDLChanges.PS1 V1.0 8-Apr-2026 2026-04-08 11:46:29 +01:00
Report-RecentGroupOperations.PS1 Update 2026-04-07 18:39:08 +01:00
Report-RecoverableItems.PS1 Add comment about BodyPreview 2024-09-16 19:01:18 +01:00
Report-RecoverableItemsPS.PS1 Update - remove unwanted code 2025-04-30 19:44:21 +01:00
Report-RetentionLabelAssignments.PS1 V1.0 2025-03-27 22:52:20 -07:00
Report-RoleAssignments.PS1 Refactor OnPremisesUser flag handling and update scopes (#150) 2026-02-01 20:50:01 +00:00
Report-RoomMailboxUsage.PS1 Update 2025-06-10 10:29:28 +01:00
Report-RoomMailboxUsageSummary.PS1 V1.0 23-May-2026 2026-05-23 23:15:10 +01:00
Report-ServicePlans.PS1 Update 2023-12-06 18:16:33 +00:00
Report-ServicePrincipalAssignments.PS1 Update 2023-11-22 13:23:43 +00:00
Report-ServicePrincipalConnections.PS1 Fix incorrect usage of the Not operator in PowerShell condition (#126) 2025-02-19 13:33:18 +00:00
Report-ServicePrincipalsWithHighPermissions.PS1 V1.0 2025-01-27 20:29:15 +00:00
Report-SharedMailboxResponseTimes.PS1 V1.0 19-Feb-2026 2026-02-19 14:28:52 +00:00
Report-SharingAuditEvents.PS1 Update a switch option 2024-07-04 16:27:27 +01:00
Report-SharingOneDriveFiles.PS1 Changed computation of base URL for OneDrive sites 2024-11-20 13:02:16 +00:00
Report-SitesWithDefaultSensitivityLabels.PS1 V1.0 2025-03-18 18:46:16 +00:00
Report-SPOFilesDocumentLibrary.PS1 Update Report-SPOFilesDocumentLibrary.PS1 2025-01-03 12:54:42 +00:00
Report-SPOFileVersions.PS1 Update 2024-10-08 15:08:10 +01:00
Report-StreamAuditEvents.PS1 Final flourish 2024-01-10 18:47:42 +00:00
Report-TeamPrivateChannelMembership.PS1 Update 2026-05-30 23:22:41 +01:00
Report-TeamsApps.PS1 Update Report-TeamsApps.PS1 2024-07-10 09:53:52 +02:00
Report-TeamsChatInfo.PS1 V1.0.2 18-June-2025 2025-06-18 18:29:08 +01:00
Report-TeamsEmojis.PS1 V1.0 with print output 2025-11-06 19:18:11 +00:00
Report-TeamsOwners.PS1 Uopdate 2024-06-05 05:21:03 +01:00
Report-TeamsTags.PS1 Update 2024-02-21 18:29:32 +00:00
Report-UserPasswordChanges.PS1 V1.5 2025-10-30 16:43:30 +00:00
Report-UserSignIns.PS1 Update 2024-12-21 20:12:21 +00:00
Report-UserUpdateAuditRecords.PS1 Update Report-UserUpdateAuditRecords.PS1 2023-08-07 19:27:17 +01:00
Report-WeeklyCalendarForRoomMailboxes.PS1 Update Report-WeeklyCalendarForRoomMailboxes.PS1 2024-05-13 23:12:31 +01:00
Report-WeeklyOutstandingTasks.PS1 Update 2026-05-04 19:08:47 +01:00
ReportActiveTeams.ps1 Update ReportActiveTeams.ps1 (#128) 2025-03-14 22:10:23 +00:00
ReportAdminAzureADAccountsNoMFA.PS1 Update ReportAdminAzureADAccountsNoMFA.PS1 2021-01-18 15:23:13 +00:00
ReportArchivedTeams.PS1 Update ReportArchivedTeams.PS1 2022-04-21 23:06:41 +01:00
ReportAuditRecFailedSignIn.PS1 Updated for Office 365 for IT Pros (2025 Edition) 2024-06-28 18:03:44 +01:00
ReportAuditRecsFileUpdates.PS1 Updated for Office 365 for IT Pros (2025 Edition) 2024-06-28 17:58:02 +01:00
ReportAuditRecsGroupCreation.PS1 Update ReportAuditRecsGroupCreation.PS1 2023-07-21 19:17:09 +01:00
ReportAuditRecsGuestDocAccess.PS1 Update for Office 365 for IT Pros (2025 edition) 2024-06-28 18:15:51 +01:00
ReportAuditRecsUserSignIns.PS1 Updated for Office 365 for IT Pros (2025 Edition) 2024-06-28 17:57:27 +01:00
ReportAuthenticationMethods.PS1 Update ReportAuthenticationMethods.PS1 2022-10-06 13:00:04 +01:00
ReportAutoExpandingArchives.PS1 Update ReportAutoExpandingArchives.PS1 2022-11-25 15:09:58 +00:00
ReportDeletedODSPDocuments.PS1 Updated for Office 365 for IT Pros (2025 Edition) 2024-06-28 18:08:35 +01:00
ReportDelveInsightsDisabled.PS1 Update ReportDelveInsightsDisabled.PS1 2021-08-23 13:24:27 +01:00
ReportDLMembershipsCounts-MgGraph.PS1 Update 2024-07-26 16:42:30 +01:00
ReportDLMembershipsCounts.PS1 Update ReportDLMembershipsCounts.PS1 2022-11-30 15:30:05 +00:00
ReportDLMembershipsCountsGraph.PS1 Update ReportDLMembershipsCountsGraph.PS1 2022-11-30 15:49:33 +00:00
ReportDLsAndManagers.PS1 Update ReportDLsAndManagers.PS1 2021-08-14 12:25:49 +01:00
ReportDocumentSensitivityLabelMismatches.PS1 Update ReportDocumentSensitivityLabelMismatches.PS1 2023-12-17 15:58:19 +00:00
ReporteDiscoveryCases.Ps1 Update ReporteDiscoveryCases.Ps1 2021-01-19 15:30:17 +00:00
ReportExpiringLinkExtended.PS1 Create ReportExpiringLinkExtended.PS1 2021-11-16 20:46:17 +00:00
ReportExternalEmailSent.PS1 Update for Get-MessageTraceV2 2025-06-04 11:27:04 +01:00
ReportFilesSPOSite.PS1 Update ReportFilesSPOSite.PS1 2024-05-28 11:35:07 +01:00
ReportIndividualApplicationLicenses.PS1 Updated for Graph SDK 2025-05-09 17:30:41 +01:00
ReportLastAccountSignIn-Mg.PS1 Update ReportLastAccountSignIn-Mg.PS1 2022-05-27 00:56:54 +01:00
ReportLicenseAssignmentsToUsers.Ps1 Uopdate 2024-06-05 05:21:03 +01:00
ReportM365GroupMemberships-Graph.PS1 Uopdate 2024-06-05 05:21:03 +01:00
ReportM365GroupMemberships.PS1 Update to V2.2 2026-05-11 14:37:13 +01:00
ReportMailboxItems-Graph.PS1 Update ReportMailboxItems-Graph.PS1 2025-05-29 11:37:32 +01:00
ReportMailboxPermissionsMailboxes.PS1 V1.1 Added Start-Sleep to avoid throttling 2025-09-02 14:44:38 +01:00
ReportMailboxQuotaUsed.Ps1 Update ReportMailboxQuotaUsed.Ps1 2023-09-25 00:13:10 +01:00
ReportMailboxRightsAssignments.PS1 Update ReportMailboxRightsAssignments.PS1 2022-03-21 21:28:03 +00:00
ReportManagersAndDirectReports.PS1 Update 2026-02-20 19:30:39 +00:00
ReportMembershipM365Group.PS1 Update ReportMembershipM365Group.PS1 2021-02-16 19:08:04 +00:00
ReportMFAStatusAdmins.PS1 Update ReportMFAStatusAdmins.PS1 2023-03-08 18:20:21 +00:00
ReportMFAStatusUsers.PS1 Update 2024-01-05 21:42:40 +00:00
ReportOneDriveStorageUsage.PS1 Update ReportOneDriveStorageUsage.PS1 2021-01-18 15:28:18 +00:00
ReportPermissionsApps.PS1 Update 2025-10-18 10:42:10 +01:00
ReportPermissionsFolderLevel.PS1 Update ReportPermissionsFolderLevel.PS1 2021-01-18 15:28:57 +00:00
ReportPermissionsOnMailboxes.PS1 Update ReportPermissionsOnMailboxes.PS1 2022-03-21 21:26:24 +00:00
ReportQuarantinedMessages.PS1 Update ReportQuarantinedMessages.PS1 2021-01-18 15:32:08 +00:00
ReportRestoreRecoverableItemsAudit.PS1 Update ReportRestoreRecoverableItemsAudit.PS1 2021-01-18 15:31:37 +00:00
ReportRetentionLabelAuditEvents.PS1 Update ReportRetentionLabelAuditEvents.PS1 2021-01-18 15:33:28 +00:00
ReportRoomMailboxUsage-AzureAutomation.PS1 Update ReportRoomMailboxUsage-AzureAutomation.PS1 2022-12-07 20:42:13 +00:00
ReportRoomMailboxUsage.PS1 Update 2025-06-10 10:29:28 +01:00
ReportSendAsAuditEvents.PS1 Update ReportSendAsAuditEvents.PS1 2021-01-18 15:38:48 +00:00
ReportSensitivityLabelsAuditRecords.ps1 Update 2024-11-18 20:58:52 +00:00
ReportSensitivityLabelSettings.PS1 Added note on reportif label blocks content services 2024-11-08 13:38:47 +00:00
ReportSharedMailboxLicenses.PS1 V1.1 2025-09-19 10:36:35 +01:00
ReportSPORetentionPolicies.PS1 Update ReportSPORetentionPolicies.PS1 2021-01-18 15:36:10 +00:00
ReportSPOSiteStorageUsage.PS1 Update 2026-05-30 22:48:51 +01:00
ReportSPOSiteStorageUsedGraph.PS1 Update 2026-04-16 09:13:33 +01:00
ReportTeamsActivityData.PS1 Report the Teams usage data using the Microsoft Graph PowerShell SDK 2022-09-08 16:34:26 +01:00
ReportTeamsActivityGraph.PS1 Introduce pagination 2023-08-21 11:33:29 +01:00
ReportTeamsChannelEmailAddresses.ps1 Add SDK version of code 2024-03-15 17:28:50 +00:00
ReportTeamsChannels.PS1 Update ReportTeamsChannels.PS1 2023-07-22 00:46:27 +01:00
ReportTeamsCreationbyEmail.ps1 Update ReportTeamsCreationbyEmail.ps1 2021-01-19 15:24:08 +00:00
ReportTeamsPolicyAssignments.PS1 Update ReportTeamsPolicyAssignments.PS1 2024-01-27 21:50:27 +00:00
ReportTeamsPrivateChannels.PS1 Update ReportTeamsPrivateChannels.PS1 2022-08-12 12:27:39 +01:00
ReportUnusedExoMailboxes.PS1 V1.2 2025-09-19 11:27:28 +01:00
ReportUserAssignedLicenses-MgGraph.PS1 V1.96 8-June-2026 2026-06-08 12:01:24 +01:00
ReportUserInboxCount.PS1 Updated to use either Excel or CSV Output 2023-11-03 18:47:29 +00:00
ReportUserMembershipOfTeams.PS1 Update ReportUserMembershipOfTeams.PS1 2022-08-10 18:21:16 +01:00
ReportUsersAndManagers.PS1 Update for SDK V2.20 2024-07-24 21:43:48 +01:00
ReportWhiteBoardInfo.PS1 Update ReportWhiteBoardInfo.PS1 2022-03-09 13:51:56 +00:00
ReportYammerCommunityActivity.PS1 Update ReportYammerCommunityActivity.PS1 2021-07-06 22:45:45 +01:00
Restore-DeletedEntraGroups.PS1 V1.0 with GitHub link 2025-11-07 12:23:16 +00:00
Restore-EntraIDUserNewUPN.PS1 V1.0 2025-01-19 21:07:11 +00:00
Search-AuditLogGraph.PS1 Update 2025-01-07 15:34:36 +00:00
SearchAndRemoveItemsMailboxes.PS1 Update 2024-04-16 10:49:48 +01:00
Send-AzureCommunicationsEmail.PS1 Update 2025-03-04 17:19:02 +00:00
Send-EmailExchangeHVE.PS1 Update 2024-08-26 18:39:48 +01:00
Send-HVEEmailRunbook.PS1 V1.0 2025-01-27 17:31:38 +00:00
Send-TeamsChatMessage.PS1 Updated image 2024-04-24 11:44:58 +01:00
Send-TeamsChatWithLotsofMentions.PS1 Update 2024-04-18 16:52:19 +01:00
Send-WelcomeMessageNewUsers.PS1 Update 2025-02-13 17:13:58 +00:00
Send-WelcomeMessageWithCalendarEvents.PS1 Update with GitHub Link 2026-05-14 20:17:00 +01:00
Send-WelcomeMessageWithICS.PS1 Update 2026-05-14 20:18:10 +01:00
Send-WelcomeNewUserMessagesHVE.PS1 Correct email formatting in welcome message script 2026-03-05 15:56:42 +00:00
SendMessageAboutDeletedStreamVideos.PS1 Update SendMessageAboutDeletedStreamVideos.PS1 2021-01-18 15:44:34 +00:00
SendMsgToGroupOwners.ps1 Update SendMsgToGroupOwners.ps1 2021-01-18 15:46:53 +00:00
SendWelcomeEmail-Mg.PS1 Update 2025-07-05 01:46:12 +01:00
SendWelcomeEmail-Runbook.ps1 Update SendWelcomeEmail-Runbook.ps1 2022-02-08 09:30:22 +00:00
SendWelcomeEmail.PS1 Update SendWelcomeEmail.PS1 2021-01-18 15:47:59 +00:00
SendWelcomeEmailGraph.PS1 Update 2026-05-11 16:11:57 +01:00
SendWelcomeMessage-UserMail.PS1 Update 2026-05-12 20:57:16 +01:00
Set-IntelligentVersioningOneDriveSites.PS1 Adde GitHub link 2024-11-27 17:44:23 +00:00
SetAutoReplyTeamsGroups.PS1 Update 2023-11-29 20:22:23 +00:00
SketchPad.PS1 V2.0. Add message tracescan for full 90 days 2026-06-07 14:27:56 +01:00
SPOSitesRetention.ps1 Update SPOSitesRetention.ps1 2021-01-19 15:33:16 +00:00
Switch-Licenses.PS1 V1.0 2023-12-02 23:08:13 +00:00
Switch-LitigationHoldsForEDiscovery.PS1 V1.0 2025-05-02 16:57:57 +01:00
Switch-LitigationHoldsforRetentionPolicies.PS1 Update 2025-08-01 23:52:43 +01:00
Synchronize-M365GroupSecurityGroup.PS1 V1.0 2026-01-17 15:35:50 +00:00
TeamsCreationReportByEmail.PS1 Update 2026-01-13 13:48:55 +00:00
TeamsGroupsActivityReport.ps1 Update 2024-09-22 16:06:02 +01:00
TeamsGroupsActivityReportV5.PS1 Update 2025-05-21 19:01:25 +01:00
Test-BatchProcessing.PS1 Update 2024-05-15 18:48:17 +01:00
Test-ComplianceHolds.PS1 Update 2023-11-07 16:19:02 +00:00
Update-AppLockInstance.PS1 Update Update-AppLockInstance.PS1 2023-12-10 21:31:31 +00:00
Update-BannedPasswordsList.PS1 V1.0.2 2025-06-17 15:15:25 +01:00
Update-BreakGlassUsersCAPolicies.PS1 Update Update-BreakGlassUsersCAPolicies.PS1 (#129) 2025-03-14 22:09:44 +00:00
Update-DomainBlocks.PS1 Update V1.0 2023-12-08 23:25:28 +00:00
Update-DynamicM365GroupAzureAutomation.PS1 Added article link 2025-09-29 17:06:11 -05:00
Update-GroupPhotosSDK.PS1 Updated to add counter 2023-10-03 16:11:04 +01:00
Update-M365GroupOwners.PS1 Update 2025-01-18 15:39:18 +00:00
Update-Managers.PS1 Updated for SDK V2.20 2024-07-24 18:59:32 +01:00
Update-MicrosoftIRMCAPolicies.PS1 Last change 2024-02-06 21:49:48 +00:00
Update-OneDriveGroupMembers.PS1 Update 2024-06-28 19:37:54 +01:00
Update-PlanWithTasks.PS1 Make task fetching faster 2024-06-12 16:04:35 +01:00
Update-RetentionLabelsOneDrive.PS1 Update 2025-07-18 15:46:59 +01:00
Update-RetentionPolicySharedMailboxes.PS1 V1.0.2 3-Aug-2025 2025-08-03 20:29:22 +01:00
Update-SensitivityLabels.PS1 Update 2026-03-13 17:29:46 +00:00
Update-TenantCustomBranding.PS1 Add error check for sign in text 2024-01-24 23:02:40 +00:00
UpdateAzureAutomationGraphModules.PS1 Update 2024-08-27 18:26:48 +01:00
UpdateGuestPhotos.PS1 Update Photos for Azure AD Guest Accounts 2023-04-12 16:42:30 +01:00
UpdateMailboxAuditing.PS1 Added step to disable auditing before reenabling it 2024-01-21 12:45:21 +00:00
UpdateOffice365PowerShellModules.PS1 Update for Maester 2026-02-06 15:51:37 +00:00
UpdateOutlookSignature.PS1 Update UpdateOutlookSignature.PS1 2021-01-18 15:57:14 +00:00
UpdateOWASignatures.ps1 Update UpdateOWASignatures.ps1 2021-01-18 15:55:46 +00:00
UpdateSensitivityLabelsForGroups.PS1 Update UpdateSensitivityLabelsForGroups.PS1 2021-01-18 15:58:00 +00:00
UpdateSPOSitesWithLabels.PS1 Update UpdateSPOSitesWithLabels.PS1 2021-11-10 18:54:16 +00:00
UpdateStaticRetentionPolicy-AzureAutomation.PS1 Update organization name 2022-12-07 11:49:04 +00:00
UpdateSubscribersInGroupsUsedByTeams.PS1 Update UpdateSubscribersInGroupsUsedByTeams.PS1 2024-09-26 11:00:00 +01:00
UpdateUserPhotos.PS1 Updated for Graph SDK 2023-10-03 15:42:19 +01:00
Upload-LargeAttachmentChunks.PS1 V1.0 2025-02-14 18:12:24 +00:00
Upload-ManyAttachmentstoMessage.PS1 Update 2025-02-15 16:53:13 +00:00

Office365itpros

Office 365 for IT Pros PowerShell examples

This repository holds PowerShell examples used in:

The Office 365 for IT Pros ebook https://gum.co/O365IT/

The Automating Microsoft 365 with PowerShell eBook https://o365itpros.gumroad.com/l/M365PS

Articles published on Office365itpros.com and Practical365.com

For more information, see https://office365itpros.com. We document how we use the scripts at https://office365itpros.com/office-365-github-repository/