remote Start-BitsTransfer fails when source is UNC path

hi there!

I’m trying to start BITs transfer jobs remotely on several Windows 2016 servers (now supported Win 10 & Win 2016 - Using Windows PowerShell to Create BITS Transfer Jobs - Win32 apps | Microsoft Docs) within my script. The code that keeps failing is as follows:

$myCred = Get-Credential

Invoke-Command -ComputerName remote_server_FQDN {Start-BitsTransfer \\sourceFQDN\E$\someFolder\2016VM.vhd \\destFQDN\E$\someFolder\2016VM.vhd -Asynchronous -Authentication Negotiate -credential $args[0]} -Authentication Credssp -Credential $myCred -ArgumentList $myCred

Running this cmdlet will return an “Access is Denied” error message:

icm -computerName remote_server_FQDN {Get-BitsTransfer -AllUsers | Select *}

CredSSP has already been enabled for the server and client (where script is running from) based on this guide: Enable PowerShell "Second-Hop" Functionality with CredSSP - Scripting Blog

Please let me know if anyone has some ideas to make this work.

thanks!

Bao Tran

Why not just create scheduled task on those remote machines and run the code their directly?