Quantcast
Viewing all articles
Browse latest Browse all 2770

Handle PowerShell response in C#

I am trying to call a remote power shell command-let and converting into C# objects 

Get-SCVirtualNetworkAdapter -All

One of the Response Object :

IPv4Addresses                              : {12.12.12.12}

And MemberType is

Deserialized.System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] Property

How to cast particular PSObject vNetworkAdapter.Members["IPv4Addresses"].Value into List<string> without using systemcenter assembly ?



Viewing all articles
Browse latest Browse all 2770

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>