I am getting no error but export csv comes out like this
"Module","Assembly","TypeHandle","DeclaringMethod","BaseType","UnderlyingSystemType","FullName","AssemblyQualifiedName","Namespace","GUID","IsEnum","GenericParameterAttributes","IsSecurityCritical","IsSecuritySafeCritical","IsSecurityTransparent","IsGenericTypeDefinition","IsGenericParameter","GenericParameterPosition","IsGenericType","IsConstructedGenericType","ContainsGenericParameters","StructLayoutAttribute","Name","MemberType","DeclaringType","ReflectedType","MetadataToken","GenericTypeParameters","DeclaredConstructors","DeclaredEvents","DeclaredFields","DeclaredMembers","DeclaredMethods","DeclaredNestedTypes","DeclaredProperties","ImplementedInterfaces","TypeInitializer","IsNested","Attributes","IsVisible","IsNotPublic","IsPublic","IsNestedPublic","IsNestedPrivate","IsNestedFamily","IsNestedAssembly","IsNestedFamANDAssem","IsNestedFamORAssem","IsAutoLayout","IsLayoutSequential","IsExplicitLayout","IsClass","IsInterface","IsValueType","IsAbstract","IsSealed","IsSpecialName","IsImport","IsSerializable","IsAnsiClass","IsUnicodeClass","IsAutoClass","IsArray","IsByRef","IsPointer","IsPrimitive","IsCOMObject","HasElementType","IsContextful","IsMarshalByRef","GenericTypeArguments","CustomAttributes"
"System.Management.Automation.dll","System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","System.RuntimeTypeHandle",,"System.Object","System.Management.Automation.PSObject","System.Management.Automation.PSObject","System.Management.Automation.PSObject, System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","System.Management.Automation","0b8e33af-1f2a-38de-a865-22cc5931d778","False",,"True","False","False","False","False",,"False","False","False","System.Runtime.InteropServices.StructLayoutAttribute","PSObject","TypeInfo",,,"33555176","System.Type[]","System.Reflection.ConstructorInfo[]","System.Reflection.EventInfo[]","System.Reflection.FieldInfo[]","System.Reflection.MemberInfo[]","System.Reflection.MethodInfo[]","System.Reflection.TypeInfo+<get_DeclaredNestedTypes>d__23","System.Reflection.PropertyInfo[]","System.Type[]","Void .cctor()","False","AutoLayout, AnsiClass, Class, Public, Serializable, BeforeFieldInit","True","False","True","False","False","False","False","False","False","True","False","False","True","False","False","False","False","False","False","True","True","False","False","False","False","False","False","False","False","False","False","System.Type[]","System.Collections.ObjectModel.ReadOnlyCollection`1[System.Reflection.CustomAttributeData]"