PowerTip: View PowerShell Console Host Information

PowerTip: View PowerShell Console Host Information

  • Comments 2
  • Likes

Summary: View Windows PowerShell console host information.

Hey, Scripting Guy! Question How can I easily find information about the Windows PowerShell console host?

Hey, Scripting Guy! Answer Use the Get-Host cmdlet, and select the RawUI property from the InterhostUserInterface object:


Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • There is also a built-in $host variable that contains the same information.

    So $host.ui.rawUI is another way to access that data.

    From the help:

    The $host automatic variable contains the same object that Get-Host

    returns, and you can use it in the same way.  Similarly, the

    $PSCulture and $PSUICulture automatic variables contain the same

    objects that the CurrentCulture and CurrentUICulture properties of the

    host object contain. You can use these features interchangeably.

  • @G. Samuel Hayes you are absolutely correct. Personally, I kind of go between the two methods. But most of the time, I probably actually do $host. Thank for sharing.