Hi,
I got issue to convert it correctly to HTML. Appreciate any help on this.
$MCount=(get-mailboxdatabase) | where-Object {$_.name -NotMatch "DB1" -And $_.name -NotMatch "DB2" -And $_.name -NotMatch "DB3" -And $_.name -NotMatch "DB4" -And $_.name -NotMatch "DB5"} |foreach-object {write-host $_.name (get-mailbox -database $_.name).count} | ConvertTo-Html -head $BodyStyle