Forum Discussion
Cristian Ceobanu
Jul 31, 2019Copper Contributor
Get email alerts for low than 50 free Office 365 licenses
Hi all, In my environment we have for the moment to SG who are entitled for 0ffice 365 licence. Is a dynamic environment and a few times we have been very closed to rich our total limit. I’m lockin...
Hemat Maheshwari
Brass Contributor
You can simply use below logic - Get the number of consumed units and based on the consumption call email alert. You can extend below logic for your script by adding some error handling and email function.
Change the tenant name and sku type - you want to monitor
$GetConsumedUnits=(Get-MsolAccountSku | where {$_.AccountSkuId -eq "tenant:ENTERPRISEPACK"}) | Select-Object ConsumedUnits
If ($GetConsumedUnits.ConsumedUnits -gt xx)
{
Call Email Alert Function
}
Cheers,
H,
Cristian Ceobanu
Aug 01, 2019Copper Contributor
Thanks Hemat, i will start to do some test right now :).