API Reference
Class
SmbShares
Provides methods to enumerate SMB shares via WMI.
Inheritance
- Object
- SmbShares
Methods
public static List<SmbShareInfo> Enumerate(String computerName) #Returns:
List<SmbShareInfo>Synchronous helper that enumerates SMB shares on a computer.
Parameters
- computerName System.String
- Target computer name or IP.
public static async Task<List<SmbShareInfo>> EnumerateAsync(String computerName, CancellationToken cancellationToken = null) #Returns:
Task<List<SmbShareInfo>>Enumerates SMB shares via Win32_Share.
Parameters
- computerName System.String
- Target computer name or IP.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static Task<List<SmbShareInfo>> GetAsync(String computerName = null, CancellationToken cancellationToken = null) #Returns:
Task<List<SmbShareInfo>>Gets SMB shares on the specified or local computer.
Parameters
- computerName System.String = null
- Target computer; null/empty means local machine.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object