Attempting to use UNC paths during a remote PS session will fail due to the way credentials are stripped away for security reasons with powershell. Luckily there is a really simple solution. CredSSP.
1 |
Enter-PSSession -ComputerName $conServer -Credential $creds -Authentication Credssp |
Note that to use this you must enable credssp here's how:
On the client machine:
1 |
Enable-WSManCredSSP -Role Client -DelegateComputer *.domain.lan -Force |
Make sure to set your domain correctly
On the servers you wish to connect too:
1 |
Enable-WSMaCredSSP -Role Server -Force |
Keep in mind for this to work you must use the -Credential parameter. For more details check out this TechNet link: http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/14/enable-powershell-quot-second-hop-quot-functionality-with-credssp.aspx.