# AddPowerShell

- Module: [CommunityToolkit.Aspire.Hosting.PowerShell](/reference/api/go/communitytoolkit.aspire.hosting.powershell.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

## Definition

```go
func (DistributedApplicationBuilder) AddPowerShell(
    name string,
    options ...*AddPowerShellOptions,
) PowerShellRunspacePoolResource
```

## Parameters

- `name` (`string`)
- `options` (`...*AddPowerShellOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddPowerShellOptions` argument.

- `LanguageMode` (`*string`)
- `MinRunspaces` (`*float64`)
- `MaxRunspaces` (`*float64`)

## Returns

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

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
