다음 스크립트를 실행하면 (실제 스크립트의 일부 임) 다음 오류 메시지가 나타납니다. PowerShell에서 : The term 'xsd' 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:10 char:3
'xsd'라는 단어가 cmdlet, 함수, 스크립트 파일 또는 작동 가능한 프로그램의 이름으로 인식되지 않습니다.
$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
내가 먼저 '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:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64
XSD는 시스템의 exe 파일입니까? '$ env : Path'를 검사하여 그 경로가 있는지 확인할 수 있습니다. XSD는 익숙한 PowerShell cmdlet이 아닙니다. – Matt
@Matt 요청한 정보를 게시물에 추가했습니다. – SeToY
'xsd'는 cmdlet이 아닙니다. 오류 메시지와 마찬가지로 정확하게 알려줍니다. 오류 메시지를 믿어보십시오. –