Skip to content

Instantly share code, notes, and snippets.

@KurtDeGreeff
Forked from dfinke/Show-Map.ps1
Created October 6, 2015 11:33
Show Gist options
  • Save KurtDeGreeff/09f751c525be33db9662 to your computer and use it in GitHub Desktop.
Save KurtDeGreeff/09f751c525be33db9662 to your computer and use it in GitHub Desktop.
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