Skip to content

Instantly share code, notes, and snippets.

@chubin
chubin / Enable-wttr.in-for-PowerShell
Created Feb 22, 2016
How to enable wttr.in in a PowerShell console
View Enable-wttr.in-for-PowerShell
# To enable ANSI sequences in a PowerShell console run the following commands.
# After that you can use wttr.in in you PowerShell just lake that:
# (curl http://wttr.in/ -UserAgent "curl" ).Content
#
# More on it:
# http://stknohg.hatenablog.jp/entry/2016/02/22/195644 (jp)
#
Add-Type -MemberDefinition @"
[DllImport("kernel32.dll", SetLastError=true)]