0 votes

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?

by (410 points)

1 Answer

0 votes
by (227k points)
selected by
Best answer


Most probably the issue occurs because you specified the table width so that not all the text is displayed in the execution log. We recommend you to output the results into a CSV file using the Export-Csv cmdlet.
If you need help updating the script, post here or send us (support[at]adaxes.com) the following details:

  1. The full version of the script you are using.

  2. The version of Adaxes you are currently using. To check that:

    • Launch Adaxes Administration Console.
    • Right-click your service.
    • Click Properties in the context menu.
    • Adaxes version is displayed on the General tab.

The width was the issue. The results window from Adaxes is much smaller than when I work in the regular powershell ISE 1920x1200. I read more on Format-Table and there is a '-width' option. I specified that and it returned all of my columns.

Related questions

0 votes
1 answer

Hello everyone, I've received a task to send a report of pending and denied approval requests of a specific task to an email of one of our managers. Since ... $report = $reportHeader + $reportFooter # Send Mail $Context.SendMail($to, $subject, $NULL, $report)

asked Apr 7, 2020 by rshergh (110 points)
0 votes
1 answer

I'm testing the latest version. When I remove the domain user security assignment, create a new security role that is identical, but limits the assignment to a ... triggers the change between tree and table view for the Active Directory Location selector?

asked Dec 29, 2011 by mpaul (360 points)
0 votes
1 answer

Hi, Following an update from Adaxes 2016 to 2021.1 we noticed that the date format on the email notifications is no longer English UK, but English US, i.e. ... every scheduled task/business rule that sends a notification and changing the variable? Thanks, Gary

asked 3 days ago by gazoco (430 points)
0 votes
1 answer

Hi, I was just wondering if there was a way to force the format of the date picker value in the web approval interface. We have operation that are very time specific ... like that in the web interface. Example of the problem: Thank you, Jean-Simon Tremblay

asked Dec 3, 2021 by jsimon.tremblay (20 points)
0 votes
1 answer

Hello, https://www.adaxes.com/info_whats-new.htm mentions that "Values for various attributes, such as msExchRecipientTypeDetails, msExchRecipientDisplayType and ExchRemoteRecipientType, are ... ? Can it be due to 2017 config used on 2018 Adaxes?

asked Sep 5, 2018 by DLe (760 points)
2,801 questions
2,535 answers
61,632 users