Skip to content

Set-ConsoleTitle fails in ISE #75

@fullenw1

Description

@fullenw1

PSVersion Table

PS> $PSVersionTable

Name                           Value                                                                                                                                                                                                                                                                                   
----                           -----                                                                                                                                                                                                                                                                                   
PSVersion                      5.1.17763.1007                                                                                                                                                                                                                                                                          
PSEdition                      Desktop                                                                                                                                                                                                                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                                                                                                                 
BuildVersion                   10.0.17763.1007                                                                                                                                                                                                                                                                         
CLRVersion                     4.0.30319.42000                                                                                                                                                                                                                                                                         
WSManStackVersion              3.0                                                                                                                                                                                                                                                                                     
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                                                                                                     
SerializationVersion           1.1.0.1

What is the syntax or expression you are using?

Set-ConsoleTitle -Title 'WinUpdate'

What happens?

Set-ConsoleTitle : Cannot validate argument on parameter 'Title'. The "$_.length -le ($host.UI.RawUI.MaxWindowSize.Width * 2)" validation script for the argument with value "WinUpdate" did not return a result of True. Determine why the validation script failed, and then try the command again.
At line:1 char:25

The thing is that $host.UI.RawUI.MaxWindowSize.Width returns nothing in an ISE console.

What do you think should happen?

It should set the title of the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions