CmdID / PowerShell / Cmdlets / Get
Get-Host
Gets an object that represents the current host program. PowerShell reference
From the PowerShell reference
What it does
Gets an object that represents the current host program. The Get-Host cmdlet gets an object that represents the program that is hosting Windows PowerShell. The default display includes the Windows PowerShell version number and the current region and language settings that the host is using, but the host object contains a wealth of information, including detailed information about the version of Windows PowerShell that is currently running and the current culture and UI culture of Windows PowerShell. You can also use this cmdlet to customize features of the host program user interface, such as the text and background colors.
Get-Host [<CommonParameters>]
Get information about the PowerShell console host
Get-HostIdentifyResize the PowerShell window
$H = Get-Host
$Win = $H.UI.RawUI.WindowSize
$Win.Height = 10
$Win.Width = 10
$H.UI.RawUI.Set_WindowSize($Win)IdentifyGet the PowerShell version for the host
(Get-Host).VersionIdentifyGet the current culture for the host
(Get-Host).CurrentCulture | Format-ListIdentifyGet the DateTimeFormat for the current culture
(Get-Host).CurrentCulture.DateTimeFormat | Format-ListIdentifyGet the RawUI property for the host
(Get-Host).UI.RawUIIdentifySet the background color for the PowerShell console
(Get-Host).UI.RawUI.BackgroundColor = "Black"
Clear-HostIdentifySet the background color for error messages
$Host.PrivateData.ErrorBackgroundColor = "white"IdentifyIts page in the reference: Get-Host.