Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 术语';xsd&x27;无法识别为cmdlet、函数、脚本文件或可操作程序的名称_Powershell_Xsd_Cmdlet - Fatal编程技术网

Powershell 术语';xsd&x27;无法识别为cmdlet、函数、脚本文件或可操作程序的名称

Powershell 术语';xsd&x27;无法识别为cmdlet、函数、脚本文件或可操作程序的名称,powershell,xsd,cmdlet,Powershell,Xsd,Cmdlet,执行以下脚本(这是实际脚本的一部分)时,我在powershell中收到以下错误消息: 术语“xsd”不能识别为cmdlet、函数、脚本文件或可操作程序的名称。请检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。第10行字符:3 $xsds = ls *.xsd | %{ $_.Name } if ($xsds.Count -eq 0) { exit } # Add '.\' to last file name, see http://stackoverflow.com/ques

执行以下脚本(这是实际脚本的一部分)时,我在powershell中收到以下错误消息:

术语“xsd”不能识别为cmdlet、函数、脚本文件或可操作程序的名称。请检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。第10行字符:3

$xsds = ls *.xsd | %{ $_.Name }

if ($xsds.Count -eq 0) { exit }

# Add '.\' to last file name, see http://stackoverflow.com/questions/906093/xsd-exe-output-filename
$last = $xsds | select -last 1
$last = '.\' + $last
$xsds[$xsds.Count - 1] = $last

& xsd $xsds /c /n:OutputFolder
我是否需要安装Powershell以首先运行“xsd”cmdlet

$env:Path的输出:

PS C:\Users\Administrator\Desktop\New> $env:Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Mi
crosoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files
(x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Micro
soft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program F
iles (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\
PS C:\Users\Administrator\Desktop\New>
文件夹中提供了
xsd.exe

C:\ProgramFiles(x86)\Microsoft SDK\Windows\v8.1A\bin\NETFX 4.5.1工具


C:\Program Files(x86)\Microsoft SDK\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64

列出的路径不是PATH环境变量的一部分。这就给你留下了两个选择。将目录添加到路径,或仅通过其完整路径引用exe

& "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\xsd.exe" $xsds /c /n:OutputFolder
如果你想改变你的路径,你可以像这样更新它们

$env:Path += ";C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools"

如果需要x64路径,只需更新字符串。

列出的路径不是PATH环境变量的一部分。这就给你留下了两个选择。将目录添加到路径,或仅通过其完整路径引用exe

& "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\xsd.exe" $xsds /c /n:OutputFolder
如果你想改变你的路径,你可以像这样更新它们

$env:Path += ";C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools"

如果需要x64路径,只需更新字符串。

XSD是系统中某个地方的exe文件吗?您可以检查
$env:Path
以查看该路径是否存在。XSD不是我熟悉的powershell cmdlet。@我已将请求的信息添加到帖子中。
XSD
不是cmdlet。就像错误消息告诉你的一样。尝试相信错误消息。XSD是系统中某个地方的exe文件吗?您可以检查
$env:Path
以查看该路径是否存在。XSD不是我熟悉的powershell cmdlet。@我已将请求的信息添加到帖子中。
XSD
不是cmdlet。就像错误消息告诉你的一样。尝试相信错误消息。