PS C:> C:\ test.ps1
Error:
*The term 'c:\test.ps1' is not recognized as the name of a
spelling of the name, or if a path was included, verify t
At line:1 char:12
+ c:\test.ps1 <<<<
+ CategoryInfo : ObjectNotFound: (c:\test.ps1
+ FullyQualifiedErrorId : CommandNotFoundException*
我的脚本包含
$letterArray = "a","b","c","d"
foreach ($letter in $letterArray)
{
Write-Host $letter
}
答案 0 :(得分:0)
将脚本移动到另一个(更深)文件夹并再试一次?你也可以尝试
& c:\test.ps1