Set-HostProperty

Last updated last month

Sets the current host property.

Syntax

Set-HostProperty [-ForegroundColor <Black | DarkBlue | DarkGreen | DarkCyan | DarkRed | DarkMagenta | DarkYellow | Gray | DarkGray | Blue | Green | Cyan | Red | Magenta | Yellow | White>] [-BackgroundColor <Black | DarkBlue | DarkGreen | DarkCyan | DarkRed | DarkMagenta | DarkYellow | Gray | DarkGray | Blue | Green | Cyan | Red | Magenta | Yellow | White>] [-HostWidth <Int32>] [-Persist]

Detailed Description

Sets the current host property and perssits them for the future if used with -Persist parameter.

© 2010-2017 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

Parameters

-ForegroundColor <ConsoleColor>

Color of the console text.

Aliases

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BackgroundColor <ConsoleColor>

Color of the console background.

Aliases

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HostWidth <Int32>

Width of the text buffer (texts longer than the number provided will wrap to the next line.

Aliases

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Persist <SwitchParameter>

Persist the console setting provided

Aliases

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

Notes

Help Author: Adam Najmanowicz, Michael West

Examples

EXAMPLE 1

Set width of the console buffer to 80 and persist it for the future instances

PS master:\> Set-HostProperty -HostWidth 80 -Persist

EXAMPLE 2

Set color of the console text to cyan. Next instance of the console will revert to default (white).

PS master:\> Set-HostProperty -ForegroundColor Cyan

Related Topics