# Written by Scott Hanselman, http://www.computerzen.com 3:32 AM 7/2/2006 $query = $args $searchUrl = (Get-Item "HKCU:\Software\Google\Google Desktop\api").GetValue("search_url") [System.Reflection.Assembly]::LoadWithPartialName("System.Web") > $null $newQuery = $searchUrl + [System.Web.HttpUtility]::UrlEncode($query) + "&format=xml&flags=576&num=1000" $webclient = new-object System.Net.WebClient $resultsXml = [xml]($webclient.DownloadString($newQuery)) $resultsXml.results.result | where { $_.category -eq "file"} | foreach-object { get-item $_.url }