upload Verified current stable Not installed? Filesystem

Upload / Upload File To Host

Upload File To Host

Upload a file to a remote host via a WinRM session.

$
Terminal
upload <path/to/local_file> <path/to/remote_file>

When To Use

When deploying scripts or files for remote execution on a target system.

Pro Tip

Use absolute paths for accuracy. Verify file permissions on the target host post-upload.

Anatomy of Output

Understanding the result

Uploading C:/local/file.txt to C:/remote/destination/file.txt Upload Operation

Indicates the source and destination of the file upload.

[*] File uploaded successfully Operation Success

Confirm that the file transfer completed without errors.

[*] Total 1 file uploaded Upload Summary

Shows summary of files uploaded during the session.

Power User Variants

Optimized versions

upload C:/local/script.ps1 C:/remote/scripts/script.ps1

Upload a PowerShell script to the remote host.

upload C:/local/config.json C:/remote/config.json

Upload a configuration file.

Troubleshooting

Common pitfalls

[-] The remote path does not exist.

Solution: Ensure the specified remote path exists and is accessible.

[-] Access denied for file upload.

Solution: Check permissions for the user on the target system.

[-] Local file not found.

Solution: Verify the local file path is correct and accessible.

Command Breakdown

What each part is doing

upload
Base Command
The executable that performs this operation. Here it runs Upload before the shell applies any redirect operators.
<path/to/local_file>
Input Files
The file path or paths supplied to this command.
<path/to/remote_file>
Input Files
The file path or paths supplied to this command.

Alternative Approaches

Comparable commands in other tools

Alternative filesystem tools for the same job.