---
title: "Set-Variable"
---
Creates or assigns a configuration variable in Otter.
Otter::Set-Variable(
	[Credentials: <text>],
	Name: <text>,
	Value: <text>,
	[Server: <text>],
	[Role: <text>],
	[Environment: <text>],
	[Sensitive: <true/false>],
	[Host: <text>],
	[ApiKey: <text>]
);
| Name | Format | Script Usage | Usage Notes | 
|---|---|---|---|
| Credentials | text | Credentials | |
| ☆ Variable name | text | Name | This argument is required. | 
| ☆ Value | text | Value | This argument is required. | 
| Server name | text | Server | |
| Role name | text | Role | |
| Environment name | text | Environment | |
| Sensitive | true/false | Sensitive | |
| Otter server URL | text | Host | Not specifying will "Use URL from credentials". | 
| API key | text | ApiKey | Not specifying will "Use API key from credentials". | 
Note: If multiple entity scopes are provided, the variable will be multi-scoped. If no entity scope is provided, a global variable will be set.
# sets the variable for the hdars-web-1k-tokyo server to the name of the current application
Otter::Set-Variable
(
    Credentials: ProductionOtter,
    Server: hdars-web-1k-tokyo,
    Name: LatestDeployedApplication,
    Value: $ApplicationName,
    Sensitive: false
);