> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/windows/copy-to.md).

# Copy To

Writes the devices the workflow collected into one file on a Windows machine over WinRM. A name ending in `.csv` produces a CSV table, any other name produces JSON. The target machine is the one you enter in the IP field, not the devices in the workflow.

### Before you begin

* WinRM enabled on the target machine and reachable from the OctoXLabs server on the port you set (5985 for HTTP, 5986 for HTTPS).
* A Windows account that can write to the target directory.
* Asset type: `device` (the default). Required column: `Hostname`; devices without a hostname are left out.
* The columns written come from **Edit Columns** on the canvas toolbar for the device inventory. If none are selected, only `Hostname` is written (a warning is logged).
* Job Settings defaults are described in [Action Center Settings](broken://pages/b0db97c7083665e2fade4a5e1253df7ea527db04).

### Settings

| Setting                            | Type          | Required | Default | Description                                                                                                                                                            |
| ---------------------------------- | ------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IP                                 | Text          | Yes      | None    | Hostname or IP address of the machine the file is written to.                                                                                                          |
| Port                               | Number        | No       | 5985    | WinRM port: 5985 for HTTP, 5986 for HTTPS. Range 1 to 65535.                                                                                                           |
| Use SSL                            | Checkbox      | No       | Off     | Connect over HTTPS. Set the port to 5986 as well.                                                                                                                      |
| Username                           | Text          | Yes      | None    | Username to connect with WinRM.                                                                                                                                        |
| Password                           | Text (masked) | Yes      | None    | Password for that user. Sensitive: shown as ten asterisks after saving.                                                                                                |
| Authentication                     | Choice        | No       | ntlm    | One of `ntlm`, `basic`, `kerberos`, `credssp`, `plaintext`. Windows disables Basic authentication by default; NTLM works on a stock installation.                      |
| Remote target, ex: C:\path         | Text          | Yes      | None    | Absolute directory on the remote machine, such as `C:\reports` or `\\server\share\reports`. Must not contain `..`, and a colon is allowed only after the drive letter. |
| File name to save. Ex: example.csv | Text          | Yes      | None    | A bare file name, not a path. The extension decides the content: `.csv` writes a CSV table, anything else writes JSON. The characters \`< > "                          |

### How it works

The job runs once per workflow run and writes one file with all collected devices. It connects to the machine in the IP field, creates the target directory if it does not exist (including parent folders), uploads the content, and writes `<Remote target>\<File name>`. An existing file with the same name is overwritten.

CSV output has one header row with the selected columns and one row per device. List values are joined with `|`, and a missing value is written as `null`. JSON output is an object keyed by device `Hostname`, with the selected columns as its fields.

The upload goes through a temporary staging file in `C:\Windows\Temp` on the target, which the job removes afterwards. Server certificates are not validated.

Any failure (missing password, session, directory, upload or write) fails the job with a message that names the WinRM endpoint or step. On success the job passes the assets it received on to the next node unchanged.

### Example

```
IP:                        fileserver.example.com
Port:                      5986
Use SSL:                   On
Username:                  EXAMPLE\svc-octo
Password:                  YOUR_PASSWORD
Authentication:            ntlm
Remote target, ex: C:\path: C:\reports
File name to save:         devices.csv
```

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/1ac66f09f2d20b027acd60eb7888183c338d1e94">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values and SSH connections for jobs.</td><td><a href="broken://pages/b0db97c7083665e2fade4a5e1253df7ea527db04">Broken link</a></td></tr><tr><td><strong>Copy To</strong></td><td>Upload device data to a Linux server over SSH.</td><td><a href="broken://pages/3411b99d03b96665dfb94e8e59f50973bc350081">Broken link</a></td></tr><tr><td><strong>Run Command</strong></td><td>Run a PowerShell command on Windows devices.</td><td><a href="broken://pages/9dc0ddfe595931fa05791fe09c1029ed1df3b617">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.0.0.
{% endhint %}
