Following on the heels of my last post, Test-Uri, this function provides a canned function to test web responses. As part of the CodePlex module for PowerShell security I am working on, this function works to gather key details about servers you may be contacting. Its quite long, but, the majority of it is just parameter definition and if statements.
A required parameter indicating the URI of the remote server.
#>
[CmdletBinding()]
param(
[Parameter(
Mandatory =$true,
Position = 1,
ValueFromPipeline =$true
)]
[ValidateScript({Test-Uri-Uri$_})]
[String]
$Uri,
[Switch]
$All=$false,
[Switch]
$CharacterSet=$false,
[Switch]
$ContentEncoding=$false,
[Switch]
$ContentLength=$false,
[Switch]
$ContentType=$false,
[Switch]
$Cookies=$false,
[Switch]
$Headers=$false,
[Switch]
$IsFromCache=$false,
[Switch]
$IsMutuallyAuthenticated=$false,
[Switch]
$LastModified=$false,
[Switch]
$Method=$false,
[Switch]
$ProtocolVersion=$false,
[Switch
About lamsim
Author Description here.. Nulla sagittis convallis. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.