Get-DownloadSize.ps1
function Get-DownloadSize { <# .SYNOPSIS Short Description .DESCRIPTION Detailed Description .EXAMPLE Get-DownloadSize explains how to use the command can be multiple lines .EXAMPLE Get-DownloadSize another example can have as many examples as you like #> [CmdletBinding()] param ( [Parameter(Mandatory,ValueFromPipeline)] [String] $Url ) process { $webRequest = [System.Net.WebRequest]::Create($Url) $response = $webRequest.GetResponse() $response.ContentLength $response.Dispose() } } |