TestimoX

API Reference

Class

ServerFeatures

Namespace ComputerX.Features
Assembly ComputerX
Modifiers static

High-level entry point for querying installed Server Manager features (roles/role services/features) using WMI.

Inheritance

  • Object
  • ServerFeatures

Methods

public static List<ServerFeatureInfo> Get(String computer = null, Boolean includeAvailable = false, Nullable<TimeSpan> timeout = null, String[] namePatterns = null) #
Returns: List<ServerFeatureInfo>

Gets installed server features (roles/role services/features) for the specified computer. Returns an empty list on client SKUs or when the provider is not available.

Parameters

computer System.String = null optionalposition: 0
Optional computer name. Defaults to local machine when null.
includeAvailable System.Boolean = false optionalposition: 1
When true, enriches output with Server Manager catalog data (similar to Get-WindowsFeature) so non-installed features can also be returned.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 2
Optional command timeout for catalog enrichment.
namePatterns System.String[] = null optionalposition: 3
Optional wildcard patterns (`*`/`?`) used to filter on feature name fields (FeatureName, DisplayName, and Name). In installed-only mode, canonical-name filters can trigger catalog fallback matching while still returning installed entries only.
public static Task<List<ServerFeatureInfo>> GetAsync(String computer = null, Nullable<TimeSpan> timeout = null, CancellationToken ct = null, Boolean includeAvailable = false, String[] namePatterns = null) #
Returns: Task<List<ServerFeatureInfo>>

Asynchronously gets installed server features (roles/role services/features) for the specified computer. Returns an empty list on client SKUs or when the provider is not available.

Parameters

computer System.String = null optionalposition: 0
Optional computer name. Defaults to local machine when null.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 1
Optional timeout. Defaults to WmiDefaultTimeout.
ct System.Threading.CancellationToken = null optionalposition: 2
Cancellation token.
includeAvailable System.Boolean = false optionalposition: 3
When true, enriches output with Server Manager catalog data (similar to Get-WindowsFeature) so non-installed features can also be returned.
namePatterns System.String[] = null optionalposition: 4
Optional wildcard patterns (`*`/`?`) used to filter on feature name fields (FeatureName, DisplayName, and Name). In installed-only mode, canonical-name filters can trigger catalog fallback matching while still returning installed entries only.