Get-PSUJobOutput property types?

Product: PowerShell Universal
Version: 2.7.4

Good morning,

I have an endpoint that is calling another script using Invoke-PSUScript.

I want to be able to parse our the errorstream and I think its possible by using Get-PSUJobOutput and checking the various types that it returns. I was not able to find any documentation on the different types.

From initial glance the “Type” of 4 is an error and 0 looks to be standard output. I would just like to verify this before making the assumption and im also curious about the other int Types.

        "dataObj": [
            {
                "Id": 0,
                "Message": null,
                "Type": 4,
                "Data": "Failed to find UserPrincipalName [  ]",
                "Job": null,
                "Timestamp": "/Date(1651670097134)/"
            },
            {
                "Id": 0,
                "Message": null,
                "Type": 4,
                "Data": "Failed to find UserPrincipalName [  ]",
                "Job": null,
                "Timestamp": "/Date(1651670098256)/"
            },
            {
                "Id": 0,
                "Message": null,
                "Type": 4,
                "Data": "<redacted>",
                "Job": null,
                "Timestamp": "/Date(1651670098258)/"
            },
}

Here’s a reference:

    public enum JobOutputType
    {
        Information = 0,
        Verbose = 1,
        Debug = 2,
        Warning = 3,
        Error = 4,
        Progress = 5
    }
1 Like