API Reference
Class
PowerShellModuleManager
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
public PowerShellModuleManager() #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[]
- cancellationToken System.Threading.CancellationToken = null
Examples
var summary = await manager.EnsureModulesAsync(new[] { "DnsServer" });