다음 코드를 실행할 때 :
$creds = Get-Credential -UserName other -Message none
# answering the creds dialogue with correct password here
Start-Process C:\Windows\system32\cmd.exe -Credential $creds
cmd윈도우가 열립니다 (완전히 정상적인 외모와 나는 ... 설정을 변경할 수 있습니다)하지만 난 창에 아무것도 입력 할 수 없습니다. 일반 사용자인지 관리자 계정인지에 관계없이 powershell 자체는 일반 사용자 또는 관리자로 실행됩니다. Powershell이 Sysinternal을 통해 시스템으로 실행될 때를 제외하고 psexec다음과 같은 오류가 발생합니다.
Start-Process : This command cannot be run due to the error: Access denied
At line:1 char:1
+ Start-Process C:\Windows\system32\cmd.exe -Credential $creds
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
나는 이것을 결합 cmd.exe하고 powershell대신 전체 cmd를 경로와 추가 -NoNewWindow매개 변수를하지만 그 아무것도 차이가합니다 (에도 불구하고 새로운 창을 엽니 다하지 않습니다 -NoNewWindow). runnnig "정상"프로그램이 notepad모든 것과 같이 예상대로 작동하면-예를 들어 실행할 때도 마찬가지 runas /user:other cmd입니다. 현재 테스트 할 Windows [버전 10.0.17134.165] 만 있으며 다른 버전에서 동일한 지 확실하지 않지만 Windows 10 전용 (?)이라고 생각합니다.
Powershell의 또 다른 killjoy 결함 또는 뭔가 빠졌습니까?