更新时间:2023-11-29 19:04:04
使用 Invoke-Command 而不是 enter-pssession.
enter-pssession
示例:
$ReturnValue = Invoke-Command -ComputerName $Server -ScriptBlock{ Set-Location D: # DO STUFF Return $ReturnValue # Return your stuff }
PowerShell 输入会话查找路径错误