We have a client that has around 290 users in their 365/Active Directory. We bill them for their 365 licenses but will also bill them a set fee for IT Support. It is a Per User Per Month fixed fee.
What we need to have scheduled is a report on a particular day each month detailing the 'active; users. The client is happy that the total number of billable users is the figure taken on that particular day.
We have been looking into the simplest way to automate this. We have been using manual exports showing the User Last Login date but not finding that to be accurate.
Any other way to report on this and to automate the report?
This script will fetch active counts, consumed units, and available units for Office 365 E1, Office 365 E3, Microsoft E3, and PowerBI Pro
1. Replace Contso with the companyname: Get the details from when connected to azure (Connect-MsolService)
2. Save details of the account - How to save credentials in powershell for automation, encrypted
3. Script lists is an example which provides Office 365 E1,Office 365 E3, Microsoft E3 and PowerBI you can include other details to get a complete report on License usage
4. Update the From and To address
5. Enter the SMTP IP address, this will send email to recipient with the table as mentioned in output
6. Add this to a schedule task and set to run on that specific date of the month or daily How to schedule powershell script from task manager
Open in new window
Output: