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 (430 points)

1 Answer

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

Hello,

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.
0

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

we want to pull a simple small data set for a user from a database, store it in an custom attribute and then display it to the users via the we front end EG: ... use a customtextmultivalue but we cant store any formatting in there so the table becomes a mess

asked Apr 5 by i*windows (280 points)
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

At user creation, when the inbox is created, I'd like to be able to format the address as firstname.lastname@domain.com for some users. Other users firstnameintial.lastname@domain.com, is this possible? Envornment is hybrid O365. Thanks!

asked Jan 4 by cewilson (190 points)
0 votes
1 answer

As you can see in the picture, we currently have three different formats as soon as we look at a user's data. Can this be adjusted so that only one format dd.mm.yyyy is displayed? Thank you very much

asked Nov 17, 2023 by DRiVSSi (300 points)
3,548 questions
3,239 answers
8,232 comments
547,814 users