r/PowerShell • • Mar 15 '16

¯\_(ツ)_/¯

function Get-AsciiShrug {
    $OutputEncoding = [System.Text.Encoding]::unicode
    write-output "¯_($(0x30C4|%{[char]$_}))_/¯" | clip
}
144 Upvotes

48 comments sorted by

View all comments

2

u/StratoLion Mar 15 '16

I can't get this to work. How should I use it from Powershell ISE?

5

u/gangstanthony Mar 15 '16

clip automatically puts it into the clipboard. you will see no output on the powershell console when this is run. just run the function then do ctrl+v to see the clipboard contents.

2

u/StratoLion Mar 15 '16

OMFG THIS IS AMAZING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2

u/GoGoGadgetWhiskey Mar 16 '16

I learned the pipe-to-clip trick watching those MS powershell video tutorials. It works in the regular command prompt as well! :)

I do this a lot:

C:\> systeminfo |clip
C:\> notepad 

and... paste

1

u/Proxiconn Mar 18 '16 edited Mar 18 '16

systeminfo |clip

FTFY

systeminfo |clip | Get-Clipboard > test.txt; notepad test.txt

Edit: work in ISE not shell

1

u/GoGoGadgetWhiskey Mar 19 '16
C:\> systeminfo > test.txt & notepad test.txt

Some stuff is just easier in cmd. But I would never do that. How often do I want to save a txt file with that info in it? I pipe it to clip because the result often goes over the screen buffer limit.