Powershell - Playing with the Windows clipboard
To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!
A new article on how to send and retrieve information from the Windows clipboard.
I use these commands in certain functions that allow me to reformat copied text and then paste it back into the expected format.
# Set clipboard contentSet-Clipboard -Value 'Hi'# or via the pipeline'Hello' | Set-Clipboard
# Add content to clipboard'Hello' | Set-Clipboard -Append
# Display clipboard contentGet-Clipboard
# Display content in a single string valueGet-Clipboard -Raw#(Get-Clipboard).count(Get-Clipboard -Raw).count
# Copy a folderSet-Clipboard -Path D:\Sessions
# Display information about the copied folderGet-Clipboard -format FileDropList
# Copy filesSet-Clipboard -Path D:\Sessions\*Get-Clipboard -format FileDropList
# Display information about a copied imageGet-Clipboard -format image
# Example of use# Turning the clipboard contents into a miniscule(Get-Clipboard).ToLower() | Set-Clipboard
Related links
Powershell - Testing network connectivity and port accessibility
Testing network connectivity and port accessibility with PowershellPowershell - Display network connections (equivalent to netstat)
Display network connections (listening ports, active connections...)Powershell - Testing name resolution (equivalent to nslookup)
Powershell commands to test name resolution (equivalent to nslookup)Powershell - View and manage DNS configuration of network interfaces
Powershell commands to display and manage DNS configuration of network interfacesPowershell - Managing IP configuration of network interfaces
Powershell commands to view and modify the IP configuration of network interfacesPowershell - Managing the status and configuration of network interfaces
Powershell commands to view and modify the status and configuration of network interfaces (disable IPv6, enable/disable an interface)
Follow me on
Support me
Last content
Powershell - Testing network connectivity and port accessibility
Powershell - Display network connections (equivalent to netstat)
Powershell - Testing name resolution (equivalent to nslookup)
Powershell - View and manage DNS configuration of network interfaces
Powershell - Managing IP configuration of network interfaces
Powershell - Managing the status and configuration of network interfaces
Powershell and the Left Hand Side
Powershell - Managing disks, partitions and volumes