Forum Discussion
Office 365 license consumption alert
- Mar 23, 2017
In terms of alerts, no. A quick glance at the Admin portal or the Reports can give you this info. If you need it automated it really takes few lines of PowerShell code to check for available licenses and fire up an email notification.
In terms of alerts, no. A quick glance at the Admin portal or the Reports can give you this info. If you need it automated it really takes few lines of PowerShell code to check for available licenses and fire up an email notification.
Hi everyone,
even if this threat appears to be stuck or dead - I would be very interested to get the powershell code for getting alerts on low license counts - based on comparision of purchased and assigned licenses directly on the tenant level.
Would be very appreciated.
best regards
Markus
- VasilMichevMar 01, 2018MVP
It takes two lines of PowerShell, and you have all the building blocks in the replies above.
- Markus KalmbachMar 01, 2018Copper Contributor
Hi Vasil,
thank you for the reply. The parts I can find above are how to send mails via powershell - got that, no issue.
I want to go straight to the available license information within the Admin Center -NOT- exporting all licensed users, counting them, storing in a file / variable looping through E1 and E3 users, and then compare it against the SUM of available licenses in the tenant.
I just want to get the latest part done - get the amount of purchased licenses from the tenant. Do you have an hint, how to get this information direct?
best regards
Markus
- Markus KalmbachMar 01, 2018Copper Contributor
I´d like to share it with you - I found the right Cmdlet: Get-MsolAccountSku
gives you the overall figures I was searching for:
AccountSkuId ActiveUnits WarningUnits ConsumedUnits
------------ ----------- ------------ -------------
p3group:STREAM 1000000 0 65so this will be the basis for our alarming script of low license counts. not the powershell folks can step in :-)
https://docs.microsoft.com/en-us/office365/enterprise/powershell/view-account-license-and-service-details-with-office-365-powershell