Skip to content

Instantly share code, notes, and snippets.

@pierre3
Created June 26, 2015 13:03
Show Gist options
  • Save pierre3/19f8e40410a758c2745d to your computer and use it in GitHub Desktop.
Save pierre3/19f8e40410a758c2745d to your computer and use it in GitHub Desktop.
google web search commandlet
function Search-Google
{
[CmdletBinding()]
Param(
# 検索ワード
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
Position=0)]
[PSObject[]]
$SearchWords
)
Begin
{
$words = @()
}
Process
{
$words += $SearchWords
}
End
{
$url = "https://www.google.co.jp/search?q={0}" -f ($words -join '+')
start $url
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment