Audio conference licensing

Chad Rodriguez 356 Reputation points
2020-04-07T16:08:09.327+00:00

I would like to run the following but only retrieve sku: MCOMEETADV. It gives me everything.

$customformat = @{expr={$.AccountSkuID};label="MCOMEETADV"},
@{expr={$
.ActiveUnits};label="Total"},
@{expr={$.ConsumedUnits};label="Assigned"},
@{expr={$
.activeunits-$.consumedunits};label="Unassigned"},
@{expr={$
.WarningUnits};label="Warning"}
$result = Get-MsolAccountSku | sort activeunits -desc | select $customformat
$runningout=@()
$result | foreach{
if($.unassigned -le 5){
$runningout+=$

}
}
[string]$body=$runningout | convertto-html
[string]$body=$result | convertto-html
$cred=Get-Credential
send-mailmessage -from test@test .com -To test@test .com -SmtpServer smtp.test.com -Port 587 -Body $body -Subject "Daily Office 365 License Report" -BodyAsHtml -Credential $cred

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
26,929 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful