-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add back content for clipboard cmdlets #4628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
797cc90
Add back content for clipboard cmdlets
SteveL-MSFT 14cc717
Fixed note
sdwheeler e36ae4e
Fixed note
sdwheeler 8e1b1d1
Update Get-Clipboard.md
sdwheeler d170def
Update Set-Clipboard.md
sdwheeler b26bff1
updated to match code
SteveL-MSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
reference/7/Microsoft.PowerShell.Management/Get-Clipboard.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml | ||
| keywords: powershell,cmdlet | ||
| locale: en-us | ||
| Module Name: Microsoft.PowerShell.Management | ||
| ms.date: 08/09/2019 | ||
| online version: https://go.microsoft.com/fwlink/?linkid=526219 | ||
| schema: 2.0.0 | ||
| title: Get-Clipboard | ||
| --- | ||
| # Get-Clipboard | ||
|
|
||
| ## SYNOPSIS | ||
| Gets the contents of the clipboard. | ||
|
|
||
| [!NOTE] | ||
| > On Linux, this cmdlet requires the `xclip` utility to be in the path. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Get-Clipboard [-Raw] [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| The `Get-Clipboard` cmdlet gets the contents of the clipboard as text. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### Example 1: Get the content of the clipboard and display it to the command-line | ||
|
|
||
| In this example we have copied the text "hello" into the clipboard. | ||
|
|
||
| ```powershell | ||
| Get-Clipboard | ||
| ``` | ||
|
|
||
| ```Output | ||
| hello | ||
| ``` | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Raw | ||
|
|
||
| Indicates that this cmdlet ignores newline characters and gets the entire contents of the clipboard. | ||
|
|
||
| ```yaml | ||
| Type: SwitchParameter | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### CommonParameters | ||
|
|
||
| This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, | ||
| -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, | ||
| -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
|
|
||
| ## INPUTS | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ### System.String | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
|
|
||
| [Set-Clipboard](Set-Clipboard.md) | ||
103 changes: 103 additions & 0 deletions
103
reference/7/Microsoft.PowerShell.Management/Set-Clipboard.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| --- | ||
| external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml | ||
| keywords: powershell,cmdlet | ||
| locale: en-us | ||
| Module Name: Microsoft.PowerShell.Management | ||
| ms.date: 08/09/2019 | ||
| online version: https://go.microsoft.com/fwlink/?linkid=526220 | ||
| schema: 2.0.0 | ||
| title: Set-Clipboard | ||
| --- | ||
| # Set-Clipboard | ||
|
|
||
| ## SYNOPSIS | ||
| Sets the contents of the clipboard. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Set-Clipboard [-Value] <string[]> [-Append] [-WhatIf] [-Confirm] [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| The `Set-Clipboard` cmdlet sets the contents of the clipboard. | ||
|
|
||
| [!NOTE] | ||
| > On Linux, this cmdlet requires the `xclip` utility to be in the path. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to say that is only supports Text formats? |
||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### Example 1: Copy text to the clipboard | ||
|
|
||
| ```powershell | ||
| Set-Clipboard -Value "This is a test string" | ||
| ``` | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Append | ||
|
|
||
| Indicates that the cmdlet does not clear the clipboard and appends content to it. | ||
|
|
||
| ```yaml | ||
| Type: SwitchParameter | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -Confirm | ||
|
|
||
| Prompts you for confirmation before running the cmdlet. | ||
|
|
||
| ```yaml | ||
| Type: SwitchParameter | ||
| Parameter Sets: (All) | ||
| Aliases: cf | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: False | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -WhatIf | ||
|
|
||
| Shows what would happen if the cmdlet runs. The cmdlet is not run. | ||
|
|
||
| ```yaml | ||
| Type: SwitchParameter | ||
| Parameter Sets: (All) | ||
| Aliases: wi | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: False | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### CommonParameters | ||
|
|
||
| This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, | ||
| -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, | ||
| -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
|
|
||
| ## INPUTS | ||
|
|
||
| ### System.String[] | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
|
|
||
| [Get-Clipboard](Get-Clipboard.md) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add a note about not being supported on ARM? Do we know what the error message is if they try?