0

I am working on a script that i want to store centrally and run on a few different servers. I have problems getting kerberos to work so i am using local accounts for now.

The target server is properly configured and a local admin account has been created for my script. I am able to connect to the server and run local scripts with:

Enter-PSSession -ComputerName server01 -Credential server01\localusername

I am able to do some basic commands like dir.

I logged in on the central repo server and created the exact same username and exact same password.

I am able to browse to that directory from the target server by using:

cd \\server02\folder\

in PowerShell.

Now, i try to connect trough Remote Powershell with:

Enter-PSSession -ComputerName server01 -Credential server01\localusername
cd \\server02\folder\

I get the following error:

cd : Access is denied
+ CategoryInfo          : PermissionDenied: [...]
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.SetLocationCommand

How can i get the browsing to external computers working trough remote PowerShell?

Elwin Hidding
  • 11
  • 1
  • 4
  • 1
    Are you certain server01\localusername has permission to browse to \\server02\? – Jeffrey Eldredge Jan 19 '16 at 21:15
  • From the server server01 using powershell and loggin in as localusername: PS S:\Users\localusername> cd \\server02\folder PS Microsoft.PowerShell.Core\FileSystem::\\server02\folder> So here it succeeds, but by using remote powershell, it does not. – Elwin Hidding Jan 19 '16 at 21:55
  • i think that running powershell on server01 while logged in as server01\localusername actually tries to log in using the username: .\localusername (what changes in server02\localusername) and that by using remote powershell it tries to login using server01\localusername. that is the only thing i can think of. – Elwin Hidding Jan 19 '16 at 22:01

0 Answers0