0 votes

Is there a way to tell the last time a distribution list was sent to? I am trying to get our ridiculous number of lists cleaned up a bit, and I figure that is the best place to start. I am assuming the "When Changed" attribute designates the last time the list was updated, not necessarily the last time it was sent to. I know that it is possible to comb through Exchange's tracking logs, but I was hoping for a more elegant solution in Adaxes. :D

Thanks!

by (360 points)
0

Hello,

It seems like it's possible to get Exchange tracking logs through PowerShell and sort the events by date. We've asked our script guys to write a script for you and will update this topic as soon as they come up with something.

0

Any luck with this request? Thank you!

1 Answer

0 votes
by (216k points)

Hello,

Yes, the script is ready. It can be used in a Business Rule, Custom Command or Scheduled Task to find out when a message was las sent to the distribution list, on which the Rule, Command or Task is executed. In the script, $exchangeServer specifies the fully qualified domain name (FQDN) of your Exchange Server. Modify it to match your environment.

$exchangeServer = "exchangeserver.domain.com" # TODO: Modify me

# Get the message tracking log for the distribution list
$session = New-PSSession -connectionURI "http://$exchangeServer/powershell" -ConfigurationName Microsoft.Exchange
Import-PSSession -session $session -AllowClobber -DisableNameChecking

$messageTrackingLog = Get-MessageTrackingLog -Recipients "%mail%" -ResultSize Unlimited | Select-Object sender, timestamp | Sort timestamp -Descending

Remove-PSSession -Session $session

if ($messageTrackingLogt -eq $NULL)
{
    $Context.LogMessage("There were no messages sent to this distribution list", "Information")
    return
}

$sender = $messageTrackingLog[0].Sender
$timeStamp = $messageTrackingLog[0].TimeStamp

$Context.LogMessage("Last message received from '$sender' on '$timeStamp'", "Information")

For your task, you can, for example, create a Custom Command that can be executed on a distribution list to find out the time when the distribution list was last sent to. To create such a Custom Command:

  1. Create a new Custom Command.
  2. On the 2nd step of the Create Custom Command wizard, select the Group object type.
  3. On the 3rd step, add the Run a program or PowerShell script action and paste the above script in the Script field.

Related questions

0 votes
1 answer

Hello, I am trying to do as best as I can researching the best and effective way to manage the properties of Office 365 Exchange Properties with Adaxes (Latest Version) ... sure if there is a command or config I missed for adjusting the Distribution Lists.

asked Dec 19, 2023 by Edogstraus00 (490 points)
0 votes
1 answer

Good Day I've found what i want and is this Scripts Repository https://www.adaxes.com/script-repository/output-the-last-time-a-distribution-list-received-mail-s122.htm. Is ... in to a Report with the addition to add one more then one Distribution? Thank you

asked May 11, 2022 by Sandberg94 (340 points)
0 votes
1 answer

We are setting up a dashboard for management end users to create distribution lists without IT assistance. We keep receiving the following error.

asked Nov 29, 2018 by willy-wally (3.2k points)
0 votes
0 answers

Hello Supportteam, we have in Sharepoint own distribution list. I want to delete the user from the ditribution list in Sharepoint, after the deprovisioning. Could you please help me in this case? Did not find a script in your repository. Thank you Massimo

asked Nov 8, 2017 by massimo.ibba (450 points)
0 votes
1 answer

Hi! I'd like to enable my HelpDesk to manage DL membership from the Web GUI ... but so far I have found two issues that I hope can be addressed ... Once the group has been ... but I'd like to find a way to remove those options if possible. Thanks. - Scott W.

asked Jun 5, 2014 by hms.scott (220 points)
3,549 questions
3,240 answers
8,232 comments
547,814 users