This topic contains 8 replies, has 4 voices, and was last updated by
August 30, 2013 at 9:36 am #9859
I have a script that tries to run Get-ChildItem with a specified path, but receives a "The specified network name is no longer available." error. However, if I paste the exact path in a Run dialog, the destination opens without issue. Is there something different with how Windows handles this request versus my Powershell command?
August 30, 2013 at 9:41 am #9860ParticipantPoints: 0Rank: Member
How are you defining the path – is it a mapped drive or UNC?
August 30, 2013 at 9:44 am #9861
Regular UNC. For troubleshooting purposes, I tried running just the Get-ChildItem command in a Powershell window to eliminate anything else in my script that might be causing an issue, but this returned the same error.
August 30, 2013 at 9:49 am #9862KeymasterPoints: 1,785Rank: Community Hero
Get-ChildItem relies on the .NET Framework under the hood; that's definitely a bit different, in terms of APIs, than what Windows Explorer would use. But it still ought to work. FWIW, it worked great in my lab:
Which could easily mean it's a permission issue or something. For example, if I don't explicitly run the shell "As Administrator," the command fails due to permissions on the C$ share on my DC.
August 30, 2013 at 9:50 am #9863MemberPoints: 0Rank: Member
Works fine for me. Try
dir \\FQDN\Shareat a normal command prompt, and see if you get the same problem (just to try to see if the problem is limited to PowerShell.)
August 30, 2013 at 9:56 am #9864
@Don: I tried a similar test using the C$ share on one of my DCs and it worked without issue, even from a non-administrator shell (my account is a member of the Domain Admins group, just as a point of information).
@dave: When I try \\FQDN\Share from both a normal and elevated command prompt, I receive a "The network name cannot be found." error.
Given this new information, I'm starting to believe that this isn't a Powershell issue, but rather something else with my configuration.
August 30, 2013 at 9:59 am #9865KeymasterPoints: 1,785Rank: Community Hero
Ah. Subtle point I missed. But FQDN works for me in addition to NetBIOS name. So it's pointing more toward your environment or configuration, as you suggested.
August 30, 2013 at 11:22 am #9869
Thank you all for your assistance. It turns out that this was a Group Policy issue. For anyone who might see this and have a similar setup, this is what I had to do in order to access my Synology NAS:
Computer Configuration –> Policies –> Windows Settings –> Security Settings –> Local Policies –> Security Options –> Microsoft Network Client: Digitally sign communications (always): Disabled
Computer Configuration –> Policies –> Windows Settings –> Security Settings –> Local Policies –> Security Options –> Network security: LAN Manager authentication level: Send NTLMv2 response only
August 30, 2013 at 11:34 am #9870MemberPoints: 0Rank: Member
Ah, I didn't realize we were talking about a non-Windows device. We've had to make similar changes in the past to access shares on Linux servers with Samba.
The topic ‘Get-ChildItem : The specified network name is no longer available.’ is closed to new replies.