I am setting up a few custom commands for office 365 incident responses so even our helpdesk users can help respond. One thing I wanted to do was have a powershell command to do a message trace to see if someone's account is compromised and sending out phishing emails.
$dateend = get-date
$datestart = $dateend.addhours(-48)
$logmessage = Get-MessageTrace -SenderAddress '%userPrincipalName%' -StartDate $datestart -EndDate $dateend -PageSize 5000 | Sort-Object -Property Received | ft Received, SenderAddress, RecipientAddress, Subject, Status, ToIP, FromIP, Size, MessageID, MessageTraceID | Out-String -Stream
$Context.LogMessage($logmessage.count, "Information")
foreach ($logline in $logmessage) { if ($logline -ne '') { $Context.LogMessage($logline, "Information") } }
When I run this in Adaxes, it only shows me the columns Received, SenderAddress, RecipientAddress, and Subject. If I run the exact same command in normal powershell the ft/Format-Table command shows me all of the columns that I specified.
Is Adaxes a partial implementation of ft or is there another way to do this?