locked
map remote drive new-psdrive with credentials RRS feed

  • Question

  • Hi,

    I need map drive using my local user credentials on remote server. Remote server user does not have access to this drive.

    I have simple code


    $Credentials  = Get-Credential -Cred "domain\user" 

    New-PSDrive -Name Results -PSProvider FileSystem -Root "\\server\share" -Credential $Credentials -Scope Global

    and this works fine on my local machine.

    But when I run this command from remote server and want to map same share drive I get error : The network resource is not correct. 

    When I run this command without -credentials on remote server, I can map drive and I see it with get-psdrive but I cannot access it with my remote user using get-childitem.

    What I do wrong?

    Thanks. 


    • Edited by ALdo1982 Monday, May 28, 2018 9:36 AM
    Monday, May 28, 2018 9:36 AM

All replies

  •  Remote server user does not have access to this drive.

    So ... why don't you grant the necessary access rights?

    Best regards,

    (79,108,97,102|%{[char]$_})-join''

    Monday, May 28, 2018 12:13 PM