Skip to content
Docs Try Aspire

DistributedApplicationBuilderExtensions Methods

Class Methods 1 member
Extensions for the Hosting.IDistributedApplicationBuilder to add PowerShell runspace pool resources.
AddPowerShell(IDistributedApplicationBuilder, string, PSLanguageMode, int, int) Section titled AddPowerShell(IDistributedApplicationBuilder, string, PSLanguageMode, int, int) extension IResourceBuilder<PowerShellRunspacePoolResource>
Adds a PowerShell runspace pool resource to the distributed application.
public static class DistributedApplicationBuilderExtensions
{
public static IResourceBuilder<PowerShellRunspacePoolResource> AddPowerShell(
this IDistributedApplicationBuilder builder,
string name,
PSLanguageMode languageMode = 3,
int minRunspaces = 1,
int maxRunspaces = 5)
{
// ...
}
}
builder IDistributedApplicationBuilder
name string
languageMode PSLanguageMode optional
minRunspaces int optional
maxRunspaces int optional
ArgumentException
DistributedApplicationException