我利用New-PSSession,在成功把host 和一台WindowXP (Powershell 2.0) slave 建立连接后,使用如下命令执行多个文件复制到
$Session = New-PSSession -Computer $Slave -credential $VMcreds -ConfigurationName
Copy-Item -Path $source -Destination $destination -ToSession $session -Recurse -Force
在HOST端报错:
Copy-Item : Unable to index into an object of type System.IO.FileInfo....
这个错误在别的版本的powershell上并没有出现。
请问这是为何?
谢谢
steven