﻿---
title: stack kb security-endpoint-management-api endpoint-script-library-list-scripts cli command
description: Get a list of scripts Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4120/reference/elastic-cli/cli/stack/kb/security-endpoint-management-api/endpoint-script-library-list-scripts
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb security-endpoint-management-api endpoint-script-library-list-scripts cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-endpoint-management-api endpoint-script-library-list-scripts \
  [options]
```

Get a list of scripts
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--page number">
    Page number of the results to return. Defaults to 1.
  </definition>
  <definition term="--page-size number">
    Number of results to return per page. Defaults to 10. Max value is 1000.
  </definition>
  <definition term="--sort-field enum">
    The field to sort the results by. Defaults to name.
    **Values:** name, createdAt, createdBy, updatedAt, updatedBy, fileSize
  </definition>
  <definition term="--sort-direction enum">
    The direction to sort the results by. Defaults to asc (ascending).
    **Values:** asc, desc
  </definition>
  <definition term="--kuery string">
    A KQL query string to filter the list of scripts. Nearly all fields in the script object are searchable.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>