小编use*_*028的帖子

在PowerShell中运行函数

我是PS的新手,已经获得了一个可以运行的脚本.我做的第一件事是输入c:\powershell\ir.ps1.这似乎有效.然后在定义我的客户端目录之后,我应该只能输入诸如的函数ir-n.这在人员的办公桌上工作,告诉我该怎么做,但是我收到以下错误:

The term 'ir-n' 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:5
+ ir-n <<<<
  + CategoryInfo          : ObjectNotFound: (ir-n:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)

有什么简单的我可以做到让它运行?我看到ir.ps1文件中的函数,所以我知道它在那里.

powershell

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

powershell ×1