Created
September 26, 2018 13:49
-
-
Save jpbruckler/7da0d1a1781838ce229d3fdf553dec02 to your computer and use it in GitHub Desktop.
PowerShell shrugs in your clipboard!
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
function Get-Shrug | |
{ | |
<# | |
.SYNOPSIS | |
Copies a shrug emoji to your clipboard. | |
.DESCRIPTION | |
Copies the shrug emoji to the clipboard. If this function is saved in a | |
file (like your $profile), the text encoding of that file needs to be | |
set to UTF-8 with BOM in order for all the characters to be displayed | |
propertly. | |
.NOTES | |
See this StackOverflow post for more information than you ever wanted | |
to know about character encoding in PowerShell. | |
https://stackoverflow.com/a/48029600 | |
#> | |
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding | |
$shrug = '¯\_(ツ)_/¯' | |
Set-Clipboard -Value $shrug | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment