Disable-ConsoleFormatting
Turns off the ConsoleMonster default formatting (Enable-ConsoleFormatting), all of it or some features.
Syntax
Disable-ConsoleFormatting
[-Feature <ConsoleFormattingFeature[]>]
[<CommonParameters>]#All Parameter SetsDescription
Without -Feature everything Enable-ConsoleFormatting turned on is turned off and the session is as it was: the Out-Default function goes (or the user's own function replaced with -Force comes back), the Write-Progress function is restored, and $ErrorView was never changed. With -Feature only those parts are turned off. Streams and ReadLine release their native colour settings. Shared properties keep the latest surviving installation; the last owner restores the first exact baseline, including subsequent edits to owned properties. The Out-Default function stays while any feature that uses it is on; Streams and ReadLine alone need no function. Registrations stay for the next Enable-ConsoleFormatting.
Examples
Example 1
Disable-ConsoleFormattingBack to PowerShell's formatting
Example 2
$formattingOptions = @{
Feature = @('Progress')
}
Disable-ConsoleFormatting @formattingOptionsKeep the views, go back to PowerShell's progress
Parameters
- -Feature ConsoleFormattingFeature[]
- The features to restore. Without Feature, all enabled features are restored. Streams and ReadLine restore the exact saved native colour properties.
- Possible values:
Output,Errors,Progress,FormatCommands,Streams,Help,ReadLine,GridView,Prompt
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.