是否可以在Powershell 2中使用不同凭据在2台服务器之间复制文件?也有不同的领域

时间:2014-04-09 21:29:28

标签: powershell powershell-v2.0

在具有不同凭据的两台服务器之间复制多个文件夹的最简单方法是什么,这些凭据具有不同域中的服务器 据我所知,-credentials参数出现在Powershell 3.0中 那么如何使用Powershell 2来实现呢? 如果可能,我希望使用copy-item cmdlet保持简单 我已经创建了选择我的文件夹的功能,但我无法通过网络复制它们。

1 个答案:

答案 0 :(得分:0)

您需要使用Copy-Item和-Credential not -Credentials