Steps to reproduce
Create a simple cmdlet with this method as the ProcessRecord()
protected override void ProcessRecord()
{
DataTable dt = new DataTable("test");
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("Age", typeof(string));
DataRow dr = dt.NewRow(); dr["Name"] = "John"; dr["Age"] = "20";
DataRow dr2 = dt.NewRow(); dr["Name"] = "Susan"; dr["Age"] = "25";
dt.Rows.Add(dr); dt.Rows.Add(dr2);
WriteObject(dt, enumerateCollection: true);
}
Expected behavior
Return type should be a System.Array with the 2 rows enumerated.
(This works on Powershell 5 with the full .NET Framework)
Actual behavior
Return type is a DataTable not a System.Array with the rows enumerated.
Environment data
Steps to reproduce
Create a simple cmdlet with this method as the ProcessRecord()
Expected behavior
Return type should be a System.Array with the 2 rows enumerated.
(This works on Powershell 5 with the full .NET Framework)
Actual behavior
Return type is a DataTable not a System.Array with the rows enumerated.
Environment data