Copy-item FileSystem provider error
Solution 1:
$Source = "C:\folder1"
$Destination = "X:\"
$Password = ConvertTo-SecureString -AsPlainText -Force -String "MyPassword"
$User = "Domain\Administrator"
$credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user,$password
New-PSDrive -Name X: -PSProvider FileSystem -Root "\\172.22.0.115\c$\folder2" -Credential $credentials
Copy-Item $Source -Destination $Destination
EDIT: silly error, you can omit the -credential switch on the copy-item cmdlet because you've already done the auth using new-psdrive...