# addPowerShell

- Module: [CommunityToolkit.Aspire.Hosting.PowerShell](/reference/api/typescript/communitytoolkit.aspire.hosting.powershell.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)

## Definition

```typescript
interface IDistributedApplicationBuilder {
  // ... omitted for brevity
  addPowerShell(
    name: string,
    languageMode?: string,
    minRunspaces?: number,
    maxRunspaces?: number): PowerShellRunspacePoolResource
}
```

## Parameters

- `name` (`string`)
- `languageMode` (`string`) `optional` `= ConstrainedLanguage`
- `minRunspaces` (`number`) `optional` `= 1`
- `maxRunspaces` (`number`) `optional` `= 5`

## Returns

[PowerShellRunspacePoolResource](/reference/api/typescript/communitytoolkit.aspire.hosting.powershell/powershellrunspacepoolresource.md) `builder`

## Applies to

- [IDistributedApplicationBuilder](/reference/api/typescript/communitytoolkit.aspire.hosting.powershell/idistributedapplicationbuilder.md)
