Windows PowerShell-基本命令无法在Windows 8上运行

时间:2014-04-21 07:35:55

标签: powershell-v3.0

基本命令,例如' get',' import'不工作当我尝试在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

我是否需要添加任何额外的支持文件才能识别基本命令?

1 个答案:

答案 0 :(得分:3)

Powershell cmdlet的格式为Verb-Noun。 “动词”(在这种情况下得到),“ - ”和“名词”(在这种情况下是帮助)之间不应该有空格。

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> -?