Configure a clipboard
Context
At the beginning of my second apprenticeship within an international travel retail company, I quickly realized that some tasks were recurring—especially writing the same sentences to close out "tickets."
Whether it was to indicate that a license had been added to an account, that a user had been added to a mailbox, or to notify that a printer had been successfully configured, these repetitive messages were part of my daily routine.
After repeating these actions many times, I looked for a solution to save time and avoid typing errors. That’s how the idea for this PowerShell script came to life.
Step-by-step Script Breakdown
Preparing the Sentences
Create an array containing commonly used phrases in tickets. The phrases are bilingual (French / English) to allow for quick reuse depending on context (~4 seconds).
Automating Clipboard Entry
Automatically loop through each phrase in the list: each one is successively copied to the system clipboard. This step allows the user to easily retrieve each message by simply pressing Windows + V, without having to open a document or template (~10 seconds).
Adding a Pause Between Copies
A 500-millisecond delay is applied between each copy to prevent multiple phrases from being overwritten too quickly in the clipboard. This slight wait time ensures the stability of each individual copy (~12 seconds).
PowerShell Script
Script Execution
Before running the script, I made sure to enable the Windows clipboard by pressing "Windows + V."
Once the script is executed, the phrases appear correctly in the clipboard. Unfortunately, according to Microsoft, it is not possible to automate the pinning of phrases. Therefore, they must be pinned manually, one by one.
If the phrases are pinned, they remain available even after restarting the PC or clearing the clipboard. It is therefore not necessary to re-run the script.