Last active
October 21, 2015 03:21
-
-
Save dfinke/1f7f8a4246c1d57fa3dc to your computer and use it in GitHub Desktop.
This file contains 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 Show-Map { | |
<# | |
.Synopsis | |
Launches a map in the browser using an address from the command line or the clipboard | |
#> | |
param( | |
$address, | |
[Switch]$UseBing | |
) | |
if(!$address) { | |
Add-Type -AssemblyName System.Windows.Forms | |
$address=[System.Windows.Forms.Clipboard]::GetText() | |
} | |
if($UseBing) { | |
start "http://www.bing.com/maps?q=$address" | |
} else { | |
start "http://www.google.com/maps/place/$address" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment