-->

How to Check SMB Share State in Windows 11

    How to Check SMB Share State in Windows 11
    Learn how to check SMB share state in Windows 11 using PowerShell, identify Online, Offline, and Pending shares, and troubleshoot network share access.

    If you manage shared folders in Windows 11, checking whether an SMB share is actually online can be useful when troubleshooting network file-sharing problems. Windows provides the ShareState property for SMB shares, allowing you to inspect whether a share is currently reported as Online, Offline, or Pending.

    In this guide, you will learn how to check SMB Share State in Windows 11 using PowerShell. You will also learn how to check one or multiple shares, filter shares by state, inspect related properties, compare Share State with active SMB sessions, and troubleshoot shares that are not available to network clients.

    What Is SMB Share State?

    SMB Share State describes the current state reported for an SMB share.

    The ShareState property can report three states:

    • Online — the share is available in an online state.
    • Offline — the share is currently reported as offline.
    • Pending — the share is in a transitional or pending state.

    Microsoft exposes this information through the Get-SmbShare cmdlet and its -ShareState parameter.

    Checking Share State can help you distinguish between a share that exists in the SMB configuration and a share whose current state needs further investigation.

    Why Check SMB Share State?

    A network share can sometimes appear to be configured correctly while users are still unable to access it. Checking Share State gives you another piece of information when investigating the problem.

    You may want to check SMB Share State when:

    • A network share cannot be opened from another computer.
    • A shared folder suddenly becomes unavailable.
    • You are troubleshooting an SMB server.
    • You are checking several SMB shares at once.
    • You are investigating a cluster or high-availability file server.
    • You want to document the current SMB configuration.
    • You need to distinguish an SMB configuration problem from a network problem.

    Share State should not be treated as the only troubleshooting indicator. Network connectivity, permissions, firewall configuration, SMB sessions, and the underlying file system can also affect access.

    Share State vs SMB Share Availability

    It is important to distinguish the state of an SMB share from other SMB properties.

    ShareState describes the state reported for the share, while properties such as ContinuouslyAvailable describe whether the share supports continuous availability.

    Similarly, ConcurrentUserLimit controls the configured number of concurrent users, while CurrentUsers reports current usage.

    For example, a share might have:

    Name                  : Projects
    ShareState            : Online
    ContinuouslyAvailable : False
    CurrentUsers          : 4
    ConcurrentUserLimit  : 10

    These properties describe different aspects of the same SMB share.

    How to Check SMB Share State in Windows 11

    The simplest method is to use PowerShell and the Get-SmbShare cmdlet.

    Step 1: Open PowerShell

    Open the Windows 11 Start menu and search for PowerShell.

    For viewing SMB share information, you can start with a normal PowerShell window. If you plan to modify SMB configuration later, open PowerShell as Administrator.

    Step 2: List SMB Shares

    Run:

    Get-SmbShare

    This displays the SMB shares configured on the computer.

    The output can include normal user-created shares as well as special or administrative shares depending on the system.

    Step 3: Display Share State

    To display the share name, path, current users, and Share State, run:

    Get-SmbShare |
    Select-Object Name, Path, ShareState, CurrentUsers

    Example output:

    Name       Path                 ShareState CurrentUsers
    ----       ----                 ----------  -----------
    Projects   D:\Shares\Projects   Online                4
    Finance    D:\Shares\Finance    Online                2
    Archive    E:\Shares\Archive    Offline               0

    This gives you a quick overview of the current state of several SMB shares.

    How to Check One SMB Share

    If you already know the name of the share you want to investigate, use the -Name parameter.

    Get-SmbShare -Name "Projects" |
    Select-Object Name, Path, ShareState, CurrentUsers

    Example:

    Name       Path                 ShareState CurrentUsers
    ----       ----                 ----------  -----------
    Projects   D:\Shares\Projects   Online                4

    This is useful when troubleshooting a single network share without displaying all SMB shares on the computer.

    How to Display All SMB Share Properties

    When troubleshooting, you may need more information than Share State alone.

    Run:

    Get-SmbShare -Name "Projects" | Format-List *

    This displays the available properties for the SMB share.

    Depending on the Windows configuration, useful properties can include:

    • Name
    • Path
    • Description
    • ShareState
    • CurrentUsers
    • ConcurrentUserLimit
    • FolderEnumerationMode
    • CachingMode
    • LeasingMode
    • ContinuouslyAvailable
    • CATimeout
    • EncryptData
    • CompressData
    • AvailabilityType
    • Special
    • Temporary
    • ShadowCopy

    This broader view can help identify whether another share property is relevant to the problem.

    How to Find Online SMB Shares

    You can filter the results to display only shares with an Online state.

    Get-SmbShare |
    Where-Object {$_.ShareState -eq "Online"} |
    Select-Object Name, Path, ShareState, CurrentUsers

    This is useful when a computer has many SMB shares and you only want to see those currently reported as online.

    How to Find Offline SMB Shares

    To identify shares reported as Offline, use:

    Get-SmbShare |
    Where-Object {$_.ShareState -eq "Offline"} |
    Select-Object Name, Path, ShareState, CurrentUsers

    If this returns a share that users are attempting to access, investigate that share and its surrounding infrastructure.

    An Offline result should not automatically be interpreted as a network failure. Continue checking the share configuration, server state, storage, cluster configuration if applicable, and SMB-related events.

    How to Find Pending SMB Shares

    You can also filter for shares reported as Pending:

    Get-SmbShare |
    Where-Object {$_.ShareState -eq "Pending"} |
    Select-Object Name, Path, ShareState, CurrentUsers

    A Pending state indicates that the share is not simply being reported as Online. It may require additional investigation depending on the environment and why the share is in that state.

    How to Check All Share States at Once

    For a quick audit, use:

    Get-SmbShare |
    Select-Object Name, Path, ShareState, CurrentUsers, ConcurrentUserLimit |
    Format-Table -AutoSize

    Example:

    Name       Path                 ShareState CurrentUsers ConcurrentUserLimit
    ----       ----                 ----------  ----------- -------------------
    Projects   D:\Shares\Projects   Online                5                   10
    Finance    D:\Shares\Finance    Online                2                    10
    Archive    E:\Shares\Archive    Offline               0                    0
    Public     D:\Shares\Public     Online                8                    0

    This lets you compare the current share state with current users and the configured concurrent-user limit.

    Share State and Current SMB Sessions

    Share State does not tell you everything about current client activity. When troubleshooting access problems, you should also inspect SMB sessions.

    Run:

    Get-SmbSession

    This provides information about active SMB sessions on the server.

    You can also select useful properties:

    Get-SmbSession |
    Select-Object ClientComputerName, ClientUserName, NumOpens, SessionId

    If a share is Online but users still cannot access it, checking active SMB sessions can help determine whether clients are already connected or whether the issue is occurring elsewhere.

    For a more detailed explanation, see How to Check SMB Sessions in Windows 11.

    Check SMB Connections

    On the client side, you can inspect active SMB connections with:

    Get-SmbConnection

    This is useful when the problem occurs from a Windows 11 computer attempting to connect to another SMB server.

    You can select important properties such as:

    Get-SmbConnection |
    Select-Object ServerName, ShareName, UserName, Dialect, Encrypted

    For more information, see How to Check SMB Connections in Windows 11.

    Share State vs Share Permissions

    An SMB share can be Online and still deny access to a particular user.

    Share State and permissions answer different questions:

    • Share State: What state is the SMB share currently reporting?
    • SMB share permissions: Which accounts are allowed or denied at the share level?
    • NTFS permissions: Which accounts can access the underlying folder and files?

    To inspect SMB share permissions, run:

    Get-SmbShareAccess -Name "Projects"

    You can also read our guide on How to Check SMB Share Permissions in Windows 11.

    Check Folder Enumeration Mode

    Folder visibility is another separate SMB share property.

    Check it with:

    Get-SmbShare -Name "Projects" |
    Select-Object Name, ShareState, FolderEnumerationMode

    The FolderEnumerationMode property determines how files and folders are presented during enumeration. It should not be confused with Share State.

    For a complete explanation, see How to Check SMB Folder Enumeration Mode in Windows 11.

    Check Concurrent User Limits

    If users are experiencing connection problems, also check the configured concurrent-user limit:

    Get-SmbShare |
    Select-Object Name, ShareState, CurrentUsers, ConcurrentUserLimit

    A share can be Online while its configured concurrent-user limit is reached or nearly reached.

    See How to Check SMB Concurrent User Limit in Windows 11 for a detailed explanation.

    Check SMB Share Availability Properties

    For more advanced SMB configurations, you may also want to inspect availability-related properties.

    Get-SmbShare -Name "Projects" |
    Select-Object Name, ShareState, AvailabilityType, ContinuouslyAvailable, CATimeout

    These properties can be particularly relevant when working with clustered or highly available file-server environments.

    ContinuouslyAvailable and CATimeout should not be confused with ShareState. They describe different aspects of SMB availability and failover behavior.

    Our related guide covers How to Check SMB Continuous Availability in Windows 11.

    Check SMB Share State on a Remote Computer

    If you have the appropriate permissions and remote management is configured, Get-SmbShare can also retrieve information from a remote computer through a CIM session.

    For example:

    $Session = New-CimSession -ComputerName "FileServer01"
    
    Get-SmbShare -CimSession $Session |
    Select-Object Name, Path, ShareState, CurrentUsers
    
    Remove-CimSession $Session

    This can be useful when you are administering multiple Windows computers from a central workstation.

    Remote administration requires appropriate permissions and connectivity. If the remote query fails, troubleshoot Windows management connectivity separately from the SMB share itself.

    Export SMB Share State to CSV

    If you are auditing several shares, you can export the results to a CSV file.

    Get-SmbShare |
    Select-Object Name, Path, ShareState, CurrentUsers, ConcurrentUserLimit |
    Export-Csv "$env:USERPROFILE\Desktop\SMB-Share-State.csv" -NoTypeInformation

    You can then open the CSV file in Excel or another spreadsheet application.

    This is useful for documenting the SMB environment before and after configuration changes.

    What to Do if an SMB Share Is Offline

    If a share reports Offline, do not immediately change random SMB settings. Start with a structured troubleshooting process.

    1. Check the Share Configuration

    Get-SmbShare -Name "Projects" | Format-List *

    Review the path, state, permissions-related information, availability settings, and other properties.

    2. Check the Underlying Folder

    Verify that the path shown by the SMB share still exists and is accessible locally.

    For example, if the share points to:

    D:\Shares\Projects

    confirm that the folder and underlying storage are available.

    3. Check SMB Sessions

    Get-SmbSession

    This helps determine whether clients are currently maintaining SMB sessions with the server.

    4. Check SMB Server Configuration

    Get-SmbServerConfiguration

    This can reveal relevant server-side SMB settings when troubleshooting broader file-sharing problems.

    See How to Check SMB Server Configuration in Windows 11.

    5. Check Network and Firewall Settings

    If the SMB server itself appears healthy but clients cannot connect, inspect network connectivity, Windows Firewall, network profile, network discovery, and file and printer sharing.

    Share State Troubleshooting With Network Testing

    When SMB access fails, remember that SMB operates over the network stack. A share problem can sometimes actually be a TCP/IP, firewall, or connectivity problem.

    Microsoft's SMB troubleshooting guidance recommends investigating both the SMB and underlying network layers when diagnosing difficult problems.

    Useful basic tests include:

    ping 192.168.1.10

    You can also test the SMB service port:

    Test-NetConnection 192.168.1.10 -Port 445

    If TCP port 445 cannot be reached, investigate network connectivity and firewall configuration before focusing exclusively on SMB share properties.

    Share State vs Other SMB Share Properties

    Property Purpose
    ShareState Reports the SMB share state such as Online, Offline, or Pending.
    CurrentUsers Shows the current number of users associated with the share.
    ConcurrentUserLimit Defines the configured maximum number of concurrent users.
    FolderEnumerationMode Controls how files and folders are presented during enumeration.
    CachingMode Controls SMB share caching behavior.
    LeasingMode Controls SMB leasing behavior.
    ContinuouslyAvailable Indicates support for continuous availability.
    CATimeout Specifies the continuous-availability timeout.
    EncryptData Indicates whether SMB encryption is configured for the share.
    CompressData Indicates whether SMB compression is configured for the share.

    Useful PowerShell Commands

    Purpose Command
    List SMB shares Get-SmbShare
    Check one share Get-SmbShare -Name "Projects"
    Check Share State Get-SmbShare | Select Name, Path, ShareState
    Find online shares Get-SmbShare | Where {$_.ShareState -eq "Online"}
    Find offline shares Get-SmbShare | Where {$_.ShareState -eq "Offline"}
    Find pending shares Get-SmbShare | Where {$_.ShareState -eq "Pending"}
    View all properties Get-SmbShare -Name "Projects" | Format-List *
    Check sessions Get-SmbSession
    Check connections Get-SmbConnection
    Check open files Get-SmbOpenFile
    Test SMB port Test-NetConnection SERVER -Port 445

    Frequently Asked Questions

    What is ShareState in Windows 11?

    ShareState is a property of an SMB share that reports its current state. The documented values include Pending, Online, and Offline.

    How do I check SMB Share State?

    Run:

    Get-SmbShare | Select-Object Name, Path, ShareState

    What does Online mean for an SMB share?

    An Online state means the SMB share is currently reported as online. It does not by itself guarantee that every client can access the share because permissions, networking, firewall rules, and other conditions can still prevent access.

    What does Offline mean?

    Offline means the share is currently reported as offline. Investigate the share configuration, underlying storage or folder, server state, and any relevant cluster or availability configuration.

    What does Pending mean?

    Pending indicates that the share is in a pending state rather than being reported as Online or Offline. Additional investigation may be necessary depending on the environment.

    Does ShareState control SMB permissions?

    No. Share State and permissions are separate concepts. Use Get-SmbShareAccess to inspect SMB share permissions and also consider the NTFS permissions on the underlying folder.

    Can ShareState be changed with Set-SmbShare?

    ShareState is exposed by Get-SmbShare for querying the share state. It should not be treated like configurable properties such as caching mode, encryption, compression, or concurrent-user limits. Do not attempt to force a share state as a generic troubleshooting shortcut.

    Can an Online SMB share still be inaccessible?

    Yes. An Online state does not override permissions, network connectivity, firewall rules, SMB security requirements, or NTFS access controls.

    Related Windows 11 SMB Guides

    Final Thoughts

    Checking SMB Share State is a useful step when troubleshooting network file sharing in Windows 11. The ShareState property lets you quickly identify whether an SMB share is reported as Online, Offline, or Pending.

    However, Share State is only one part of the troubleshooting process. If a share is Online but users still cannot connect, continue by checking SMB permissions, NTFS permissions, network connectivity, firewall settings, active sessions, SMB connections, and the server's broader SMB configuration.

    For administrators managing multiple Windows systems, PowerShell makes it easy to inspect Share State, export SMB configuration, compare shares, and combine share information with session and connection data.

    LihatTutupKomentar