send html-based mail to multiple recipients
The script below searches for mailbox with greater than equal to 2 GB in a specific server. What I want to accomplish is to send an email to the Managers of this mailboxes. Basically all the information I need is already in the $combine variable. How can i send this information to the managers? Contents of the mail should include the Display Name and the totalitemsize of a mailbox. ==========SCRIPT BEGINS HERE=============== #get mailbox that have higher than 2GB in a particular server $server="<servername>" $convertGB=@{Name="TotalSize (GB)";expression={$line.Totalitemsize.value.toGB()}} $storagegrp=@{Name="StorageGroup Name";expression={$line.storagegroupname}} $combine=@() $stats = Get-Exchangeserver $server | Get-MailboxStatistics | Where-Object {$_.Totalitemsize.Value.ToGB() -ge 2} | select-object DisplayName,totalitemsize,LegacyDN,storagegroupname Foreach ($line in $stats) { $combine += get-user -identity $line.LegacyDN | select-object DisplayName,$convertGB,$storagegrp,Manager } $combine | sort-object -descending "TotalSize (GB)"PoSH newbie, BaSH Oldie
October 27th, 2012 6:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics