For the complete documentation index, see llms.txt. This page is also available as Markdown.

ConvertTo-UDObject

Transforms input objects by running a post-processing script block.

SYNOPSIS

Transforms input objects by running a post-processing script block.

SYNTAX

ConvertTo-UDObject [[-InputObject] <Object>] -Process <ScriptBlock>
 [<CommonParameters>]

DESCRIPTION

Passes each input object through the supplied script block and returns the transformed result. PowerShell Universal uses this cmdlet internally to post-process endpoint output before it is returned to the dashboard.

EXAMPLES

Example 1

PS C:\> 1..3 | ConvertTo-UDObject -Process { @{ value = $_ } }

Transforms each input value into a hashtable with a value property.

PARAMETERS

-InputObject

Specifies the object to pass into the processing script block.

-Process

Specifies the script block that transforms each input object.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.

INPUTS

System.Object

OUTPUTS

System.Object

NOTES

Last updated

Was this helpful?