October 31, 2017 at 10:12 pm #83308
I am unable to use the set-location command after I have connected to remote computer using enter-pssession. Is this possible?
Thank for any help!
October 31, 2017 at 11:11 pm #83309
Provided the location you specify exists and you have permission, and the Remoting endpoint doesn't prevent it, then yes.
November 1, 2017 at 4:09 pm #83402
Thank you.... Don
The location does exist.
This is a domain computer. I can use the set-location command when I am physically on the machine:
PS C:\WINDOWS\system32> hostname
PS C:\WINDOWS\system32> Set-Location -Path \\owsms\Infotech
When connect to OWT2077 using enable-pssession and try using the set-location command I get this:
[owt2077]: PS C:\Users\e139022\Documents> Set-Location "\\owsms\infotech"
Set-Location : Access is denied
+ CategoryInfo : PermissionDenied: (\\owsms\infotech:String) [Set-Location], UnauthorizedAcc
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.SetLocation
I don't understand where the PermissionDenied is coming from?
Thank you again for your input!
November 1, 2017 at 4:20 pm #83414
Ah. You're attempting to connect to a UNC. That won't work in the default Remoting world because your delegated credential cannot be delegated across a second hop. This is “the second hop problem;” see same in “Secrets of PowerShell Remoting” on our ebooks menu. You would be perhaps better cresting a new PSDrive to the UNC, as you can provide explicit credentials to do so.
November 1, 2017 at 4:42 pm #83423
Thank you Don!
I have to say – I didn't expect to get a response from someone with your level of skill and recognition. I am pretty new to PowerShell but I have completely absorbed myself in it. I have taken your "Play by Play: PowerShell from Idea to Action" on Pluralsight. I also have listened to you on Channel 9. I have taken the courses on MVA taught by Jason Helmick and Jeffery Snover. Jeffery Snover is always touting how great the PowerShell community is. After this experience – I am can see why. You guys are all great teachers and I enjoy learning from all of you. So Thank You for sacrifices and time you give.
November 1, 2017 at 8:13 pm #83435
Don ... that guy 😉
You must be logged in to reply to this topic.