Skip to content

Instantly share code, notes, and snippets.

@zachbonham
Created February 16, 2012 16:07
Show Gist options
  • Save zachbonham/1846091 to your computer and use it in GitHub Desktop.
Save zachbonham/1846091 to your computer and use it in GitHub Desktop.
Remote execution of start-bitstransfer
$cred = get-credential
$session = new-pssession -computername fqdn -credential $cred
invoke-command { import-module bitstransfer; start-bitstransfer -source \\fnp\package_1234.zip -destination c:\temp\package1234.zip } -session $session -asjob -jobname "update"
receive-job $jobid
<#
The remote use of BITS is not supported. For more information about BITS, see the MSDN documentation at http://go.microsoft.com/FWLINK/?LinkId=140888.
+ CategoryInfo : InvalidOperation: (:) [Start-BitsTransfer], InvalidOperationException
+ FullyQualifiedErrorId : StartBitsTransferRemoteOpException,Microsoft.BackgroundIntelligentTransfer.Management.Ne
wBitsTransferCommand
+ CategoryInfo : NotSpecified: (:) [Start-BitsTransfer], Exception
+ FullyQualifiedErrorId : System.Exception,Microsoft.BackgroundIntelligentTransfer.Management.NewBitsTransferCommand
#>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment