Steps to reproduce
$sss = New-PSSession server
Copy-Item -Path 'c:\temp\[x]*' -Destination 'c:\temp' -ToSession $sss
Expected behavior
Everything that starts with the letter 'x' in the temp folder was copied to server "server".
Actual behavior
PS C:\> Copy-Item -Path 'c:\temp\[x]*' -Destination 'c:\temp' -ToSession $sss
Copy-Item : A parameter cannot be found that matches parameter name 'ToSession'.
At line:1 char:55
+ Copy-Item -Path 'c:\temp\[x]*' -Destination 'c:\temp' -ToSession $sss
+ ~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Copy-Item], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.CopyItemCommand
Environment data
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.16299.251
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.251
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Steps to reproduce
Expected behavior
Everything that starts with the letter 'x' in the temp folder was copied to server "server".
Actual behavior
Environment data