Windows PowerShell Home
Start-BitsTransfer ignores -Credential parameter
3/19/2014 5:08:01 PM
User(s) can reproduce this bug
When using Start-BitsTransfer, the -Credential parameter is ignored. This means that you cannot access file shares that require different permissions from the currently logged on user.
Also, using the runas command to open up a new PowerShell prompt to use different credentials, and then running Start-BitsTransfer does not work.
More thorough information and several different reproduction steps is listed in the answer on:
This is an extension of the similar issue documented in feedback id: 810753 (https://connect.microsoft.com/PowerShell/feedback/details/810753/)
How often does this happen?
Have you seen this problem before in this product?
Yes, this happens in all previous versions
Running PowerShell from Computer1 as user: contoso\user.
Wanting to access file from Computer2 as a user that has the appropriate permissions: contoso\admin
PS > $cred = Get-Credential -Username "contoso\admin"
PS > Start-BitsTransfer -Source \\computer2\c$\test.txt -Destination . -Credential $cred
Creates error message:
Start-BitsTransfer : Cannot find path '\\computer2\c$\test.txt' because it does not exist.
At line:1 char:1
+ Start-BitsTransfer -Credential $cred -Source computer2\c$\test.txt ...
+ CategoryInfo : ObjectNotFound: (\\computer2\c$\test.txt :String) [Start-BitsTransfer], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.BackgroundIntelligentTransfer.Management.NewBitsTransferCommand
To use the -Credential parameter to access the source with the passed credential object, and not with the currently logged in user's credentials.
to post a comment.
Please enter a comment.
to post a workaround.
Please enter a workaround.
on 3/19/2014 at 5:09 PM
$cred = Get-Credential -Username 'contoso\admin'
net use \\server\c$
Start-BitsTransfer -Source \\computer2\c$\test.txt -Destination . -Credential $cred
net use \\server\c$ /delete
© 2014 Microsoft