April 7, 2010

How to create a custom object ?

$obj=New-Object -TypeName Object
$obj|Add-Member NoteProperty MyPropertiy -value "Hello"

or

$$obj = New-Object psobject -Property @{MyURL="http://wow.com";MyRef=1}

No comments:

Post a Comment