从远程Powershell运行时,Python权限被拒绝

时间:2018-07-13 16:19:34

标签: python windows powershell

我正在尝试使用Powershell在远程计算机上执行Python脚本。

powershell ". <computer>\path\to\script.ps1; Run-Remote -computerName <computer> -scriptPath 'path\to\pystuff.py'"

“运行远程​​”是Invoke-Command的包装。我已将Invoke-Command设置为与管理员用户一起使用-Credential

执行此命令时,我会得到一个不错的Errno 13:尝试运行python path\to\pystuff.py时权限被拒绝,但是,如果我以同一管理员用户的身份手动进行远程访问并在其中运行python脚本,则它没有问题

我是否缺少Powershell的一些重要安全功能?我该如何解决这个问题?

0 个答案:

没有答案
相关问题