Albert Widjaja
asked on
Modifying Powershell: Recipients returns System.Collections.ArrayList ?
I had this question after viewing Exchange Server 2013 Message Tracking Log PowerShell help ?.
Hi All,
Can anyone please share some tips on how to modify the below script to properly list the Recipients ?
Because it is now showing: System.Collections.ArrayLi st
and also the date time is bit confusing as well since I'm using DD/MM/YYYY format in my country.
Thanks in advance
Hi All,
Can anyone please share some tips on how to modify the below script to properly list the Recipients ?
Because it is now showing: System.Collections.ArrayLi
Get-TransportService |
%{Write-Host $_.Name; Get-Messagetrackinglog -Server $_.Name -Resultsize Unlimited -Start "18/04/2017 1:00:00 AM" -End "19/04/2017 11:00:00 PM" |
Where {$_.Sender -contains "HelpDesk@domain.com" -and $_.Recipients -contains "Everyone@domain.com"} |
Select @{Name="Recipients";Expression={[string]::join(";", ($_.Recipients))}}, Sender, ClientIp, ClientHostname, Timestamp, EventID, Source, ServerHostname, ServerIp, MessageSubject, TotalBytes, ConnectorId } |
Export-Csv C:\TEMP\Email.csv -NoTypeInformation
and also the date time is bit confusing as well since I'm using DD/MM/YYYY format in my country.
Thanks in advance
ASKER
Hi LearnCTX,
FYI, the Exchange Powershell is using remoting session:
Somehow, the result is still the same Recipients column is still showing System.Collections.ArrayLi st as the result.
FYI, the Exchange Powershell is using remoting session:
$SessionRemoting = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://PRODMBXCAS04-VM.domain.com/PowerShell/ -Authentication Kerberos
Import-PSSession $SessionRemoting
Somehow, the result is still the same Recipients column is still showing System.Collections.ArrayLi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Dan it works flawlessly :-)
Open in new window