Error Accessing UNC through remote machine

Welcome Forums General PowerShell Q&A Error Accessing UNC through remote machine

Viewing 1 reply thread
  • Author
    • #209739
      Topics: 1
      Replies: 0
      Points: 12
      Rank: Member

      I’m running PowerShell as a domain administrator on my local PC

      Invoke-Command -ComputerName $computer -ScriptBlock {Copy-Item -Path ‘\\fileshare\folder\filename.txt’ -Destination ‘C:\temp\’}

      I get the following errors

      Access is denied
      + CategoryInfo : PermissionDenied: (\\fileshare\folder:String) [Copy-Item], UnauthorizedAccessException
      + FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.Copy-ItemCommand
      + PSComputerName : test

      Cannot find path ‘\\fileshare\folder’ because it does not exist.
      + CategoryInfo : ObjectNotFound: (\\fileshare\folder:String) [Copy-Item], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Copy-ItemCommand
      + PSComputerName : test

      If I try the copy-item command on the server directly it works fine, no errors.  Why do I get the errors when I try to run from my PC?

    • #209742
      Topics: 10
      Replies: 204
      Points: 1,001
      Helping Hand
      Rank: Community Hero

      The old Kerberos double hop may be your issue:

      In your case, whatever “server” hosts the fileshare would be Server C

Viewing 1 reply thread
  • The topic ‘Error Accessing UNC through remote machine’ is closed to new replies.