Return to Snippet

Revision: 68775
at February 23, 2015 02:53 by jatubio


Initial Code
#Sample of declare a simple powershell class with a constructor
#Thanks to http://www.peterhenell.se/
function ExtendedWebClient ($url,$timeout)
{
	$webclient = "" | Select url,timeout
	$webclient.url = $url
	$webclient.timeout = $timeout

	$webclient;
}

cls
$extclient = ExtendedWebClient "www.myurl.com" 100
$extclient

Initial URL

                                

Initial Description
Sample of declare a simple powershell class with a constructor
Thanks to http://www.peterhenell.se/

Initial Title
Sample of declare a simple powershell class with a constructor (Another sample)

Initial Tags

                                

Initial Language
Windows PowerShell