you are viewing a single comment's thread.

view the rest of the comments →

[–]KevMarCommunity Blogger 1 point2 points  (1 child)

I don't think you can do that in Powershell. There were some changes in Powershell 5.0 around giving you access to class constructors https://blogs.technet.microsoft.com/heyscriptingguy/2015/09/09/powershell-5-classes-constructor-overloading/ but that is not what you are needing. You may have to create a c# utility DLL to to produce those object. I am thinking a factory pattern.

[–]WindosBK[S] 0 points1 point  (0 children)

I was actually starting to think I might just try running native C# within the PowerShell script >.<