PowerShell: System.Object or PSObject? -
i have started using custom objects inside few of powershell scripts. upon looking around online noticed there 2 ways create these objects
$obj1 = new-object system.object $obj2 = new-object psobject they both have functionality needed, such setting custom properties necessary information held.
my question is, there necessary time use 1 of them on other? found article on technet seems heading in right direction giving answer question, haven't been able wrap mind around it. link below.
thanks!
i able find answers in article linked below.
as side note, answer looking seems psobject not limited system.object in terms of using them .net functions. system.object not pass custom properties .net functions psobject will
Comments
Post a Comment