> For the complete documentation index, see [llms.txt](https://docs.lithnet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lithnet.io/ams/v2.0/help-and-support/powershellmodule/set-amshostconfig.md).

# Set-AmsHostConfig

## SYNOPSIS

Sets one or more AMS host configuration parameters

## SYNTAX

```
Set-AmsHostConfig [-ApiEnabled <Boolean>] [-WebAppEnabled <Boolean>] [-ApiHostname <String>]
 [-LogPath <String>] [-ConfigPath <String>] [-ConnectionString <String>] [-SkipConnectionStringValidation]
 [<CommonParameters>]
```

## DESCRIPTION

This cmdlet allows you to specify settings that apply to the specific host where the cmdlet is run. These settings are not shared between hosts in a farm, and must be set on each individual AMS server where appropriate.

Note, you must restart the service after making changes with this cmdlet for those changes to take effect.

## EXAMPLES

### Example 1 - Enable the Access Manager API

```powershell
PS C:\> Set-AmsHostConfig -ApiEnabled $true -ApiHostName "ams.lithnet.local"
```

This example enables the AMS API, specifying a hostname of "ams.lithnet.local". This is the hostname that agents use to connect to the service, and must match exactly what is configured on the client side.

### Example 2 - Turn off the Web app

```powershell
PS C:\> Set-AmsHostConfig -WebAppEnabled $false
```

This example disables the web app, preventing user access.

### Example 3 - Modify the log location

```powershell
PS C:\> Set-AmsHostConfig -LogPath "C:\Logs\AMS"
```

This example changes the log location to "C:\Logs\AMS"

## PARAMETERS

### -ApiEnabled

Enables or disables the API service

```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ApiHostname

Sets the hostname for the API service. This is the hostname that agents use to connect to the service, and must match exactly what is configured on the client side.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ConfigPath

The path where the applications config files are stored

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ConnectionString

The connection string used to connect to the database

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -LogPath

The path where the applications log files are stored

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SkipConnectionStringValidation

Skips the process of validating the connection string. Used when the user performing the action does not have access to the database itself

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WebAppEnabled

Enables or disables the web app

```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None

## OUTPUTS

### Lithnet.AccessManager.PowerShell.HostConfigurationOptionsPSObject

## NOTES

## RELATED LINKS


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lithnet.io/ams/v2.0/help-and-support/powershellmodule/set-amshostconfig.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
