Pergunta

The basic commands like 'get', 'import' not working. The following exception is thrown when I try to run the following command in powershell.

PS C:\Users\Axiom> get -help
get : The term 'get' 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.
At line:1 char:1
+ get -help
+ ~~~
    + CategoryInfo          : ObjectNotFound: (get:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Do I need to add any extra supporting file of something for it to recognize basic commands?

Foi útil?

Solução

A Powershell cmdlet has a format of Verb-Noun. There should not be spaces between 'verb'(Get in this case),'-'and 'Noun'(help in this case).

PS C:\Users\Nitesh> Get-Help
TOPIC
    Get-Help

SHORT DESCRIPTION
    Displays help about Windows PowerShell cmdlets and concepts.

LONG DESCRIPTION

SYNTAX
    get-help {<CmdletName> | <TopicName>}
    help {<CmdletName> | <TopicName>}
    <CmdletName> -?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top