---
title: "Class PullPolicyCommand"
slug: "cli--sitecore.ch.cli.plugin.serialization.commands.pullpolicycommand"
abstract: ""
---
# Class PullPolicyCommand

Serializes one or more policy from the connected Content Hub instance to the local file system.

## 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.Serialization.CommandHandlers.PullPolicyCommandHandler

PullPolicyCommand

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

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

## Syntax

```csharp
public sealed class PullPolicyCommand : BaseCommand<PullPolicyCommandHandler>
```

## Remarks

**Optional parameters**

- `--endpoint -e` Specifies an alternative endpoint name for the execution of this command.
- `--name -n` Name of the policies to pull. Wildcards allowed.
- `--id -i` Id of policy to pull.
- `--remove-missing -r` Remove local-only entities.
- `--updates -u`Update only entities modified in the last minutes (see --minutes).
- `--minutes -m` Minutes to go back to look for modified entities. Default is 30 minutes.
- `--folder -f` Specifies the a working directory other than the current folder.

**Global parameters**

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

## Examples

Serialize a policy by ID:

```csharp
ch-cli serialization pull policy --id "<policy id>"
```

Serialize all policies, using the specified working directory:

```csharp
ch-cli serialization pull policy --folder "<local path>"
```
