Category Archives: PowerShell

Remove all Office 365 licenses for a group of users from CSV file via the Azure AD PowerShell module

Seems like licensing questions never end, so as a follow up to my previous post on how to remove any and all licenses assigned to a group of users via the good old MSOnline PowerShell module, in this article we … Continue reading

Posted in Azure AD, Microsoft 365, Office 365, PowerShell | Leave a comment

Listing all custom attributes in Office 365

While investigating a potential issue with one of our products, the question of whether any object within our AD/Azure AD has any of the customattributeXX populated popped up. Now, listing these for a given user/mailbox or a set of users … Continue reading

Posted in Exchange Online, Office 365, PowerShell | Leave a comment

Accessing audit events for Microsoft 365 Group mailboxes

As a follow up to one of my previous posts, here’s the *supported* method of querying audit events for Office 365/Microsoft 365 Group mailboxes. In a nutshell, you should use the unified audit log instead of the good old Search-MailboxAuditLog … Continue reading

Posted in Exchange Online, Microsoft 365, Office 365, PowerShell | Leave a comment

Reporting on group membership for Azure AD devices

Now that we have device-based licensing for Office available to enterprise customers as well, adding device objects to Azure AD groups will become more common. The need to report on group membership for device objects will also arise. Neither the … Continue reading

Posted in Azure AD, Graph API, Microsoft 365, Office 365, PowerShell | Leave a comment

Toggle Azure AD Security Defaults on or off programmatically

Continuing our exploration of the different policies objects exposed under the /policies Graph API endpoint, in this article we will discuss how to get the current state of the Security defaults feature, and change it as needed. But first, a … Continue reading

Posted in Azure AD, Graph API, Microsoft 365, Office 365, PowerShell | 1 Comment