# encoding: ascii
# api: powershell
# title: New-UrlFile
# description: Use this to create a .url file which can then be opened in your default browser using the Invoke-Item cmdlet.  Usage: New-UrlFile $url # or invoke-item (new-urlfile $url)
# version: 0.1
# type: function
# author: halr9000
# license: CC0
# function: New-UrlFile
# x-poshcode-id: 407
# x-archived: 2016-04-19T06:38:14
# x-published: 2009-05-23T05:38:00
#
#
function New-UrlFile
{
	param( $URL = "http://www.google.com")
	$UrlFile = [system.io.Path]::ChangeExtension([system.io.Path]::GetTempFileName(),".url")
	$UrlFileContents = `
		"[InternetShortcut]",
		"URL=$URL"
	Write-Host $URL
	$UrlFileContents | Set-Content -Path $UrlFile
	Get-Item $UrlFile
}
