public static IEnumerable<dynamic> AsDynamic(this IEnumerable<PSObject> collection) { return collection.Select(obj => obj.ToDynamic()); }