我正在尝试使用powershell从远程计算机运行python脚本。我使用的是-unconnectedsession参数,但我认为它会强制超时2小时?当我使用命令行从远程计算机中运行python脚本时,它不会超时。有人能解释一下我怎样才能延迟断开的会话的超时。在
我的powershell命令如下:
function Run-RemoteAsync($computerName, $pname, $scriptPath, $pargs)
{
$cred = Get-QRemote-Credential
Invoke-Command -indisconnectedsession -ComputerName $computerName -Credential $cred -ScriptBlock {powershell -c "$Using:pname '$Using:scriptPath' $Using:pargs"} -ConfigurationName QRemoteConfiguration
}
目前没有回答
相关问题 更多 >
编程相关推荐