Share via

SMB shared path issue

Scott Huang 3,511 Reputation points
2026-05-08T03:03:15.6866667+00:00

Hi,

On Powershell (of server 2025), I shared the SMB path like

圖片

but I got the problem below to access the shared path. Please help.

圖片

Windows for business | Windows Server | User experience | PowerShell

5 answers

Sort by: Most helpful
  1. MotoX80 37,686 Reputation points
    2026-05-08T12:53:25.22+00:00

    Everyone is not always "everyone".

    If the user on the client PC is logged in with a local account, then the server cannot authenticate it unless you have defined a local account with the same name and password on the server.

    On the client PC, open a command prompt and run "net view". If the account can be authenticated, then you should see SHR2 listed.

    net view \\ServerName
    

    If "net view" works, then you likely have a permissions problem on either the share or the folder. This script will report on shares.

    # Script: SharePermissionsSimple.ps1
    # Author: MotoX80 on Learn.Microsoft.com forums
    cls
    Get-SmbShare | Where-Object -Property Name -NotLike '*$' | foreach {        # exclude hidden and administrative shares
        write-host -ForegroundColor Blue "----------------------------------------------------------------"
    	"             {0}"  -f $_.Name  | write-host -ForegroundColor Yellow 
        write-host -ForegroundColor Blue "----------------------------------------------------------------"
    	
    	"Share permissions for {0}." -f $_.Name
        $_ | Get-SmbShareAccess | Format-Table -Property AccountName, AccessControlType, AccessRight
        ""
        "NTFS folder permissions on {0}." -f $_.Path
        (Get-Acl -Path $_.Path ).Access | foreach {
            [pscustomobject] @{
                IdentityReference = $_.IdentityReference
                Type = $_.AccessControlType
                Inherit = $_.IsInherited
                Rights = ($_.FileSystemRights.tostring().replace(", Synchronize","").replace("-536805376","Modify (Inherit Only)"))
            }
        } | Format-Table   -AutoSize
    } 
    
    
    

    If "net view" fails, then check the Security eventlog on the server and look for logon failures.

    You might want to explain what user accounts you have defined, how your users authenticate, and what security requirement you have. Does this server host a domain (Active Directory)?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Somil Jain 660 Reputation points
    2026-05-08T19:29:09.5433333+00:00

    hi Scott Huang,
    Error 0x80004005 with SMB shares is often caused by permissions, firewall settings, or SMB authentication issues rather than the New-SmbShare command itself.

    A few things to verify:

    Get-SmbShare
    Get-SmbServerConfiguration
    

    Also check:

    The folder C:\shr2 actually exists.

    NTFS permissions on the folder allow access.

    File and Printer Sharing is enabled in Windows Firewall.

    SMB services are running:

    Get-Service LanmanServer
    

    Try accessing the share locally first:

    \\localhost\shr2
    

    If localhost works but remote access fails, it is likely:

    firewall,

    network profile,

    or SMB authentication related.

    Also ensure the server network profile is set to:

    • Private or Domain not Public.
      If my answer is useful for you, please hit Accept the answer to support me.

    Thank you so much,

    Was this answer helpful?


  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Harry Phan 20,455 Reputation points Independent Advisor
    2026-05-08T04:05:24.7+00:00

    Hi Scott,

    The error you’re seeing (0x80004005) usually indicates that the SMB share was created but cannot be accessed due to either permissions or name resolution. In your PowerShell command, the -readaccess "ryone" looks like a typo — it should be a valid local or domain account (for example, Everyone). If the account name is invalid, the share is created but access fails. Also confirm that the folder C:\shr2 actually exists and that NTFS permissions allow the connecting user to read or write as intended; SMB share permissions alone are not sufficient if NTFS denies access.

    On Windows Server 2025, make sure the “File and Printer Sharing” inbound firewall rule is enabled, and that the SMB protocol is not blocked. Test connectivity by running \\servername\shr2 from a client, ensuring the server name resolves correctly in DNS. If you want anonymous access, explicitly grant Everyone read access both at the share and NTFS level. If you intend to restrict it, use proper domain accounts instead of local placeholders.

    In short, correct the access parameter to a valid identity, verify NTFS permissions on C:\shr2, and ensure the firewall allows SMB. Once those are aligned, the share will be accessible without the 0x80004005 error.

    If the above response helps answer your question, please hit "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    Harry.

    Was this answer helpful?


  5. AI answer

    2026-05-08T03:03:32.42+00:00

    Error code 0x80004005 when accessing an SMB share typically indicates a connectivity or name resolution problem rather than the share definition itself.

    Use these checks on the Server 2025 machine and from the client:

    1. Verify IP configuration
      • On the server, ensure the network adapter has a valid IP configuration and can be reached from the client (ping server name and IP).
      • If the server is set to obtain an IP automatically and there are DHCP issues, configure a static IP:
        • Open the adapter’s IPv4 properties.
        • Select Use the following IP address.
        • Enter a unique IP address, subnet mask, default gateway, and DNS servers that are valid for the network.
    2. Confirm the share is listening and reachable
      • On the server, confirm the share exists:
        • Get-SmbShare | Where-Object Name -eq 'shr2'
      • From the client, test SMB connectivity:
        • net use * \\\\<server-name>\\shr2 (or use the server IP instead of name).
      • If name-based access fails but IP-based access works, there is a DNS/NetBIOS name resolution issue. Fix DNS or hosts file so the server name resolves correctly.
    3. Check core network services on the server
      • Ensure these services are running (especially if accessing from an Azure VM or similar environment):
        • Network Connections
        • Network List Service
        • Network Location Awareness
        • Network Store Interface Service
        • DHCP Client
        • TCP/IP NetBIOS Helper
        • Workstation
      • Start any that are stopped, then retry access.
    4. Verify TCP/IP NetBIOS Helper configuration
      • If clients receive network path errors and traces show no TCP SYN from the server, make sure TCP/IP NetBIOS Helper is running as Local Service, not Local System.
    5. Test for firewall or port blocking
      • Ensure TCP port 445 is open between client and server.
      • On the client, run Test-NetConnection <server-name> -Port 445 to confirm connectivity.

    If after these steps IP-based access and port 445 connectivity work, the share \\server-name\\shr2 should be accessible without error 0x80004005.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.