Can you use PowerShell to extract E3/E5 user activity and remove licenses based on this?

Melmix 121 Reputation points
2021-03-12T07:00:00.59+00:00

Hello :-)

For a while I've been thinking I want to automate cleaning up the E3/E5 license usage. I want to look at the user activity on various platforms such as Exchange Online, Sharepoint Online, Teams and so on and if there has been no activity for like 3 months and the license wasn't recently assigned (new user), I want to remove the license.

Removing the license is easy enough. I also have the data I need from the Microsoft 365 Admin Portal with the reports for usage (https://admin.microsoft.com/Adminportal/Home?source=applauncher#/reportsUsage). However I can't seem to find any documentation on how to extract the usage by PowerShell. Is there anyone who has done this and can help me get started?

Thank you.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,384 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,618 questions
{count} votes

0 additional answers

Sort by: Most helpful