I have discovered that the interactive powershell in version 5.1 is badly limited. For example, when I use ‘LS \\fqdn\sourcedriveletter$\sourcefolder\file’ to find a known file, in a known good location, within the interactive PowerShell ver. 5.1 session, from the same domain (same creds), I get “access denied” errors? Now why is that?
ls : Access is denied + CategoryInfo : PermissionDenied UnauthorizedAccessException + FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand
I mean, why would that be? I am using the same credentials, have no connectivity problems between the servers, and am in the same AD container even! I launched form an elevated PS and even used creds to connect! But, when I try the SAME command from a mapped drive, I have no issues:
New-PSDrive -Name Z -PSProvider FileSystem -Root \\fqdn\sourcedriveletter$/sourcefolder -Credential (Get-Credential)
ls z:\file
Mode LastWriteTime Length Name
Why is that? Both servers have PS 5.1, fully updated, running 2012R2 Windows server, on VMware 6 Both server Primary suffixes are the same domain
BOTH have IPv6 and IPv4 on (they are in IPv4 subnets that have no connectivity problems):
Get-NetAdapterBinding -ComponentID "ms_tcpip6"
Name DisplayName ComponentID >Enabled
Ethernet Internet Protocol Version 6 (TCP/IPv6) ms_tcpip6 True
Is IPv6 being on the source of this problem? Or is it that this version of PowerShell is that limited? Once you map the creds the unc path works as well, btw, with or without the quotes. And no it’s not arp; I checked that.
I even tried entering the pssession with credentials and then trying ls. Nope. I still had to elevate AGAIN by mapping a credentialed drive to even SEE the file.
Something is wrong here… Any ideas? I can’t type creds for every danged command!!! Yes, I can invoke in PowerShell without issue, as long as I used credentials.
Ach!