powershell
259 TopicsNow Easily Audit Email Deletion in Office 365
I have created a PowerShell script to find out who deleted an email from the Office 365 mailbox. By using in-built filtering params, you can generate 7 granular email deletion audit reports. https://o365reports.com/2021/09/02/audit-email-deletion-in-office-365-mailbox-powershell/ I have listed a few use-cases of the script below, - Tracks all the deleted emails - Identifies who deleted emails from a shared mailbox - Audits deleted emails from a specific mailbox - Finds deleted emails by subject - Audits email deletion for custom period - Schedules audit report to track email deletion16KViews3likes1CommentPrimer: How to Use RBAC for Applications to Control App Use of the Mail.Send Permission
The temptation to use the Mail.Send application permission in scripts can lead PowerShell developers into trouble because the permission allows access to all mailboxes, including sensitive executive and financial mailboxes. Fortunately, RBAC for Applications allows tenants to control the access that apps have to mailboxes and other Exchange content. All explained here with an example script to test RBAC of Applications. https://office365itpros.com/2026/02/17/mail-send-rbac-for-applications/73Views2likes4CommentsRemoving Inactive Entra ID User Accounts with PowerShell
The Entra ID Governance solution includes a workflow to detect and remove inactive user accounts. Sounds good, but the same can be done with PowerShell if you want to avoid the cost of Entra ID Governance licenses or want to create a bespoke workflow that’s better suited to the business needs of the organization. Azure Automation would be a good way to process this workflow. https://office365itpros.com/2025/11/17/remove-inactive-user-accounts/65Views2likes0CommentsAutomating Microsoft 365 with PowerShell Second Edition
The Office 365 for IT Pros team are thrilled to announce the availability of Automating Microsoft 365 with PowerShell (2nd edition). This completely revised 350-page book delivers the most comprehensive coverage of how to use Microsoft Graph APIs and the Microsoft Graph PowerShell SDK with Microsoft 365 workloads (Entra ID, Exchange Online, SharePoint Online, Teams, Planner, and more). Existing subscribers can download the second edition now free of charge. https://office365itpros.com/2025/06/30/automating-microsoft-365-with-powershell2/724Views2likes9CommentsPractical Purview: Removing Old Items from User Calendars
A reader wants to remove all calendar items over a certain age. Compliance purge actions seem like a good way to do this, but there's a problem that needs to be fixed. eDiscovery purges can do the job, but only if you have eDiscovery Premium. And then there's Graph APIs to consider. All in all, many ways exist to purge calendar items. https://practical365.com/ediscovery-purges/74Views2likes0CommentsCreating Viva Engage Communities with the Graph API
A new beta Graph API supports the creation of a Viva Engage community. This article explains how to use the Graph SDK to create a new community with the API. It’s the start on the transition from the old Yammer APIs to fully embrace the Graph API. https://office365itpros.com/2024/01/03/viva-engage-community-graph/1.3KViews2likes0CommentsExport Office 365 Mailbox Calendar Permissions using PowerShell
Delegating calendar access is one of the popular Exchange features. As an admin, managing calendar permission is one of the challenging tasks because, Microsoft has not provided GUI based report to view calendars sharing settings. PowerShell needs multiple cmdlets to retrieve calendar permissions. So, I have created a PowerShell script that can generate 6 different calendar permission reports based on the requirement. https://o365reports.com/2021/11/02/get-calendar-permissions-report-for-office365-mailboxes-powershell I have listed a few significant use cases of the script below, Get calendar permissions for all users Get calendars shared with external users List all calendars a user has access to View all calendars’ sharing permissions (including default and anonymous sharing) Export calendar permissions for list of mailboxes – input CSV Get default calendar permission Schedule calendar permission report9KViews2likes0CommentsAll Emails purged after running Compliance command except those in "top of information store" Folder
Hello Tech Folks, We have received a request to delete some items(Email Messages] from EXCHANGE. According to this guide, https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-organization?view=o365-worldwide I created my content search and ran it [ STEP1] Then as STEP2: I connected to Compliance & Security Center in PowerShell as Admin, and ran New-ComplianceSearchAction -SearchName "ABC_004_22_2" -Purge -PurgeType SoftDelete [ I ran this command atleast 10 times ] Once I get the status via: Get-ComplianceSearchAction -Identity 'ABC_004_22_2_Purge' | Format-list It shows the task has been completed... Name SearchName Action RunBy JobEndTime Status ---- ---------- ------ ----- ---------- ------ ABC_004_22_2_Purge ABC_004_22_2 Purge Fadavinia, Ali 2021/05/18 9:26:29 PM Completed Now my question is here: I exported the results - all items deleted but not a few items residing in "top of information store" folder. How can I get those items deleted in that folder aswell? Should I be worry about items sitting there? Trying to understand why those few remaining items aren't being purged?! Thanks for your input Ali857Views2likes0CommentsOffice 365 Tenant Clone using Microsoft365 DSC
Hello Team, Does anyone know how we can clone a existing Office 365 Tenant to another using Microsoft365 DSC. I was following a YouTube video: https://www.youtube.com/watch?v=jNJuGyX7WzE&ab_channel=Microsoft365DSC I was able to export the contents from the Source Tenant, however, unable to import the contents to the Target Tenant. Script is attached.4.5KViews2likes2Comments