# Script to copy text to clipboard on Windows 10 devices

Once a particular text is copied to the clipboard, the user can paste it multiple times at different places. The administrator can use Hexnode to [deploy a script](https://www.hexnode.com/mobile-device-management/help/executing-custom-scripts-for-windows/) to store a given text on the clipboard of
Windows 10 devices. The clipboard will hold the value till another text is copied.

 Disclaimer:The Sample Scripts provided below are adapted from third-party Open-Source sites.

 

Batch Script
------------

Batch script to copy text to clipboard on Windows

echo|set/p=”text\_to\_copy”|clip 

   1

  echo|set/p=”text\_to\_copy”|clip 

   

 

  

E.g. To copy the text hello to clipboard,
` echo|set/p=”hello”|clip `

Powershell Script
-----------------

PowerShell script to copy text to clipboard on Windows

Set-Clipboard –Value “text” 

   1

  Set-Clipboard –Value “text” 

   

 

  

E.g. To copy the text hello to clipboard,
` Set-Clipboard –Value “hello” `

 Notes:- It is recommended to manually validate the script execution on a system before executing the action in bulk.
- Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.