Powershell: There is a "host" command that is not actually a command, alias or function

Created on 3 Aug 2018  路  1Comment  路  Source: PowerShell/PowerShell

Steps to reproduce

(libra) C:\ % where host

(libra) C:\ % gcm host
gcm : The term 'host' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

(libra) C:\ % gal host
gal : This command cannot find a matching alias because an alias with the name 'host' does not exist.

(libra) C:\ % gci function:/host
gci : Cannot find path 'host' because it does not exist.

(libra) C:\ % host

Name             : ConsoleHost
Version          : 6.1.0-preview.4
InstanceId       : 455e5a02-750f-4e25-a035-92f0da5a7fdd
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Expected behavior

(libra) C:\ % gcm host
CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           host -> (something)

(or any of the others: alias, function, command, cmdlet)

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.1.0-preview.4
PSEdition                      Core
GitCommitId                    6.1.0-preview.4
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Issue-Question Resolution-Answered

Most helpful comment

When you run just host, Get- is added behind the scenes, and you get output of the Get-Host.
That applies to all other nouns for Get-* cmdlets. Except for "process".

>All comments

When you run just host, Get- is added behind the scenes, and you get output of the Get-Host.
That applies to all other nouns for Get-* cmdlets. Except for "process".

Was this page helpful?
0 / 5 - 0 ratings