Write-PSULog -Properties How To

Write-PSULog -Properties How To

avatar

I was wondering if anyone had any experience using -Properties param when calling the Write-PSULog command? I cant seem to view the values that i've added to the properties hash. Not getting any errors or anything, just cant figure out how to actually use it. Or are the property hash key / values not available to be used in the -Message param?

All Comments (3)

avatar

Hello @jamesnewbanks

Thank you for reaching out.

I’d like to verify the expected behavior of `Write-PSULog -Properties` for the PSU version you are running before giving you specific guidance.

Could you please share:

* Your exact PowerShell Universal version.
* A minimal example of how you are currently calling `Write-PSULog` with `-Properties`.
* Where you expect to consume the properties: viewing them in Platform Logging, sending them to a logging target, or referencing them when building the `-Message` value.

For example, if you are currently doing something similar to the following, please share the sanitized structure:

Write-PSULog -Message 'Test message' -Properties @{
TestKey = 'TestValue'
}


That will help us determine whether what you are seeing is the expected structured logging behavior or whether additional configuration or investigation is required.

Because this is a public forum, please sanitize all evidence before posting. Remove credentials, tokens, license keys, cookies, private keys, full connection strings, email addresses, usernames, customer data, tenant or account identifiers, internal domains, hostnames, IP addresses, and private URLs. Please do not upload unredacted HAR files, memory dumps, database backups, or complete configuration files to this public thread.

Best regards,
Ruben Tapia

avatar

Hey Ruben

Yeah absolutely. Currently i'm using 2026.2.5. I'd love to send you some examples of use, but I dont have any working examples of use yet. I was checking the docs for the Write-PSULog command itself and it explains how to properly load data into the -Properties parameter, but I cant figure out how to view the data in the property field. If possible, i'd like to be able to reference it in my -Message field somehow, but i'm not sure if that's a possiblity or not. Could you maybe explain the intended behavior? I could very well just not be using it correctly.

This is what i'm able to produce from my end

Base code


Job results

Logging Page

494e684c-381b-43f9-bdc3-1d7571d503be.png

5fe621ed-ea69-4f08-8180-04c238f4bc08.png

d2339463-859d-47c2-b37f-84e819b55efd.png

avatar

@jamesnewbanks
Thank you for the additional details and for sharing your example. This is very helpful.

We’ll reproduce the same scenario in our lab using PSU 2026.2.5 to verify exactly how Write-PSULog -Properties behaves, including whether those values are retained as structured logging properties and if they can be referenced from -Message.

We’ll also check with our Development team to confirm the intended behavior of the parameter and whether there is a supported way to consume or display those properties.

Thank you again for bringing this up and for providing a clear example.

Best regards,