필자는 .txt 문서와 MS Word .doc 파일을 프린터에 보내고 싶습니다. Powershell Start-Process -FilePath C:\Temp\Versions.TXT -Verb print
을 실행하면 .txt 파일에서 잘 작동합니다.Powershell Word 문서 인쇄
하지만 Powershell 명령 Start-Process -FilePath C:\Temp\Versions.docx -Verb print
을 사용할 때 아래 오류가 나타납니다.
Start-Process : A positional parameter cannot be found that accepts argument 'version'.
At line:1 char:14
+ Start-Process <<<< -FilePath C:\Temp\Versions.docx -Verb print
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
어떤 문제가 있습니까? 누군가 도움을 주시겠습니까?
나는 그것을 시험해 보았고 나에게 잘 돌아갔다. Word 문서를 인쇄했다. 실수로 경로에 공간이 생기지 않았습니까? 경우에 따라 따옴표로 묶을 수도 있습니다. –
파일 이름에 공백이 포함되어있어 원래 게시물이 정확하지 않았습니다. 파일 이름에 공백이 있으면 오류가 나타나는 것 같습니다. 이 명령 powershell 시작 프로세스 -FilePath "C : \ Temp \ MB 새 버전 연방 CS_26207.doc"-Verb 인쇄가 작동하지 않습니다. 그러나이 명령은 작동합니다. PowerShell 시작 프로세스 -FilePath "C : \ Temp \ MB_New_version_federal_CS_26207.doc"-Verb print. 파일 이름에 공백을 사용해야합니다.이 문제를 해결할 방법이 있습니까? 감사합니다 – Doug
동일한 디렉토리 구조와 시작 프로세스 -FilePath "C : \ Temp \ MB 새 버전 연방 CS_26207.doc"-Verb 인쇄 작업을 시도했습니다. 예외는 무엇입니까? – Solaflex