Custom PowerShell Host and Converting PSObject back to base type
When hosting the PowerShell runtime is it possible to convert a PSObject back into its original type some how? For example: I have a cmdlet that calls WriteObject and pushes a collection of ClassXzy in the pipeline. When I call PowerShell.Invoke from the host end of things I retrieve a collection of PSObjects with a BaseObject propert...