I'm using C# to call Exchange 2010 PowerShell methods and I've just encountered a snag.
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.
Reading http://blogs.msdn.com/powershell/archive/2010/01/07/how-objects-are-sent-to-and-from-remote-sessions.aspx, it seems that this is normal, and the types I have are Deserialized.Namespace.TypeName.
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.