TestimoX

API Reference

Class

SmbShareQuery

Namespace ComputerX.Smb
Assembly ComputerX
Modifiers static

Collects SMB share metadata using native Windows APIs with WMI fallback.

Inheritance

  • Object
  • SmbShareQuery

Methods

Get 2 overloads
public static SmbShareCollectionResult Get(SmbShareQueryOptions options) #
Returns: SmbShareCollectionResult

Gets SMB share metadata for the local or specified computer.

Parameters

computerName System.String = null requiredposition: 0
Target computer. Empty, null, or "." uses the local computer.

Returns

Share collection result with diagnostics when a provider cannot collect evidence.

Examples


SmbShareCollectionResult result = SmbShareQuery.Get(Environment.MachineName);
foreach (SmbShareDetails share in result.Shares)
{
    Console.WriteLine($"{share.Name}: {share.Path}");
}
                
Get(ComputerX.Smb.SmbShareQueryOptions options) #

Gets SMB share metadata using the supplied query options.

Parameters

options ComputerX.Smb.SmbShareQueryOptions required
Share query options.

Returns

Share collection result with provider diagnostics.

Examples


var options = new SmbShareQueryOptions
{
    ComputerName = "FS01",
    ShareNames = new[] { "Finance", "HR" },
    Provider = SmbShareCollectionProvider.Native
};

SmbShareCollectionResult result = SmbShareQuery.Get(options);