---
title: "Class ExecuteCommand"
slug: "cli--sitecore.ch.cli.plugin.scripting.commands.executecommand"
abstract: ""
---
# Class ExecuteCommand

Executes the specified script in the Content Hub instance.

## Inheritance

object

System.CommandLine.Symbol

System.CommandLine.IdentifierSymbol

[Command](https://learn.microsoft.com/dotnet/api/system.commandline.command)

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Plugin.Scripting.CommandHandlers.ExecuteCommandHandler

ExecuteCommand

## Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.ScriptingCommands

## Assembly: Sitecore.CH.Cli.Plugin.Scripting.dll

## Syntax

```csharp
public class ExecuteCommand : BaseCommand<ExecuteCommandHandler>
```

## Remarks

**Required parameters**

- `--name -n` Specifies the script name.

**Optional parameters**

- `--endpoint -e` Specifies an alternative endpoint name for the execution of this command.
- `--args -a` Specifies a json file with arguments that are passed to the script.

**Global parameters**

- `-? --help -h` Show this help message and exit.
- `-v --verbosity` Enables verbose logging.

## Examples

Executing an script:

```csharp
ch-cli scripting execute --name "<script name>"
```

Executing an script with arguments:

```csharp
ch-cli scripting execute --name "<script name>" --args "<local path>"
```
