I have the following powershell script:

Import-Module BitsTransfer

Get-BitsTransfer -AllUsers | Set-BitsTransfer -SetOwnerToCurrentUser

which is running on Server2008 R2.

I get the error message:

Set-BitsTransfer : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

I have googled around but cannot seem to find the reason why this happens or how to fix this. I suspect it is a permission issue. I am logged in as local administrator and use the 'Run as administrator' option when starting powershell.

I have also tried setting the execution policy, but it makes no difference. I am not aware of permissions on commands in powershell. Could someone please shed some light on this.

Thanks.

link|improve this question
did you elevate your powershell session? – tony roth Jun 7 '10 at 13:50
@tony: »I am logged in as local administrator and use the 'Run as administrator' option when starting powershell.« – Joey Jun 7 '10 at 14:19
good thats a common mistake that I've seen a lot of lately, thats why I put it in as a comment rather then an answer! looks like it will be an acl issue on directory. you can run procmon to find the issue or support.microsoft.com probably. – tony roth Jun 7 '10 at 14:32
thanks I will give procmon a try and see if I can find an answer. – Rouan van Dalen Jun 8 '10 at 4:44
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown