Created
February 16, 2012 16:07
-
-
Save zachbonham/1846091 to your computer and use it in GitHub Desktop.
Remote execution of start-bitstransfer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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