title: PowerShell 2.0 via C#, return values are empty?
body: <p>I'm using C# to call Exchange 2010 PowerShell methods and I've just encountered a snag.</p>
  
  <p>The Collection returned by the Execute method don't have a BaseObject. I can use .Properties["PropertyName"], but it seems that all those values are string values. Not very practical for file size, Guids and so on.</p>
  
  <p>Reading <a href="http://blogs.msdn.com/powershell/archive/2010/01/07/how-objects-are-sent-to-and-from-remote-sessions.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/powershell/archive/2010/01/07/how-objects-are-sent-to-and-from-remote-sessions.aspx</a>, it seems that this is normal, and the types I have are Deserialized.Namespace.TypeName.</p>
  
  <p>I'm looking for a way to serialize them back into a live object that I can use properties and so on. I have the appropriate DLL and everything.</p>