TestimoX

API Reference

Class

PowerShellModuleManager

Namespace TestimoX.PowerShell
Assembly TestimoX

Manages PowerShell modules with caching and dependency resolution.

Inheritance

  • Object
  • PowerShellModuleManager

Remarks

The manager keeps a cache of loaded modules and utilises different loading strategies to retrieve modules when needed.

Examples


var manager = new PowerShellModuleManager();
var summary = await manager.EnsureModulesAsync(new[] { "DnsServer" });

        

Constructors

Methods

public async Task<ModuleLoadSummary> EnsureModulesAsync(String[] requiredModules, CancellationToken cancellationToken = null) #
Returns: Task<ModuleLoadSummary>

Ensures that the specified modules and their dependencies are loaded.

Parameters

requiredModules System.String[] requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1

Examples


var summary = await manager.EnsureModulesAsync(new[] { "DnsServer" });