Cmdlet
Write-ConsoleException
Writes an error or exception readably (Format-ConsoleError without -AsWidget).
Syntax
Write-ConsoleException [[-InputObject] <Object>] [-MaxFrames <Int32>] [-NoStack] [-ShowFrameworkFrames] [-Width <Int32>] [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Writes an error or exception readably (Format-ConsoleError without -AsWidget).
The same view as Format-ConsoleError: type, message, position, script stack, frames with file:line links, collapsed framework frames and inner errors.
Examples
EXAMPLE 1
Write-ConsoleException -InputObject 'Value'Parameters
- -InputObject Object
- An ErrorRecord, an exception or a message (pipeline input).
- -MaxFrames Int32
- The most app frames shown per error (default 8).
- -NoStack SwitchParameter
- Leaves out the stack frames: type, message and position only.
- -ShowFrameworkFrames SwitchParameter
- Shows framework frames (System, Microsoft, the PowerShell engine) instead of collapsing them.
- -Width Int32
- Lays the output out for this width instead of the terminal's.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.