Hello! I'd be happy to help you with your question.
You can use PowerShell to automate the process of exporting users with their used license type, and then schedule it to run monthly. Here are the steps you can follow:
- Install the Azure Active Directory PowerShell module on your computer.
- Open PowerShell as an administrator and connect to your Microsoft 365 tenant by running the command "Connect-MsolService".
- Run the following command to get a list of all users and their assigned licenses: "Get-MsolUser | Select-Object UserPrincipalName, DisplayName, UsageLocation, @{Name='Licenses';Expression={(Get-MsolUser -UserPrincipalName $_.UserPrincipalName).Licenses.AccountSkuId}}".
- Save the output to a CSV file using the "Export-CSV" cmdlet. For example: "Get-MsolUser | Select-Object UserPrincipalName, DisplayName, UsageLocation, @{Name='Licenses';Expression={(Get-MsolUser -UserPrincipalName $_.UserPrincipalName).Licenses.AccountSkuId}} | Export-CSV C:\export.csv -NoTypeInformation".
- Use Windows Task Scheduler to schedule the PowerShell script to run monthly.
- Optionally, you can use Power Automate to send the CSV file as an email attachment. You can use the "Get file content" and "Send an email" actions to accomplish this.
I hope this helps! Let me know if you have any other questions.