NAME
Set-Clipboard
SYNOPSIS
Sets the current Windows clipboard entry.SYNTAX
Set-Clipboard [-Append] [-AsHtml] [-Confirm] -LiteralPath
[-WhatIf] [ ] Set-Clipboard [-Append] [-AsHtml] [-Confirm] -Path
[-WhatIf] [ ] Set-Clipboard [-Value]
[-Append] [-AsHtml] [-Confirm] [-WhatIf] [ ] DESCRIPTION
The Set-Clipboard cmdlet sets the current Windows clipboard entry.
PARAMETERS
-Append [
Indicates that the cmdlet does not clear the clipboard and appends content to it. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -AsHtml [
Indicates that the cmdlet renders the content as HTML to the clipboard. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Confirm [
Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -LiteralPath
Specifies the path to the item that is copied to the clipboard. Unlike Path , the value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences. Required? true Position? named Default value NoneAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-Path
Specifies the path to the item that is copied to the clipboard. Wildcard characters are permitted. Required? true Position? named Default value NoneAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-Value
Specifies, as a string array, the content to copy to the clipboard. Required? true Position? 0 Default value NoneAccept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false-WhatIf [
Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216). INPUTS
System.String[]OUTPUTS
NOTES
Example 1: Copy text to the clipboard
PS C:\>Set-Clipboard -Value "This is a test string"
This command copies a string to the clipboard.Example 2: Copy the contents of a directory to the clipboard
PS C:\>Set-Clipboard -Path "C:\Staging\"
This command copies the content of the specified folder to the clipboard.RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=526220Get-Clipboard