GridView には、プロパティを持つクラスのコレクションまたは IEnumerable が必要であり、プロパティは列にマップされます。
あなたのような配列には、プロパティを持たない値型のオブジェクト(文字列)があるため、プロパティを列にバインドできません。
ArrayList boxesarray = new ArrayList();
次のような単純なクラスを作成できます。
public class PropertyContainer
{
public string Value {get;set;}
}
// NOTE: you can override ToString(); to customize String.Format behaviour
// and to show it in the debugger (althought there's other way for this, using
// DebuggerDisplayAttribute)
そして、データグリッドに正しくバインドされるこのクラスの配列を作成して入力します。
foreach (PSObject ps in commandResults)
boxesarray.Add(
new PropertyContainer { Value = ps.Properties["Name"].Value.ToString()});
boxes.DataSource = boxesarray;
boxes.DataBind();
その他のオプションは、LINQ を使用して配列をオブジェクトの配列に変換することです。データ グリッド列が自動的に作成されるように設定されている場合は、匿名オブジェクトを使用することもできます。
// anonymous type
var dataForBinding = boxesArray.select(val => new {Value = val});
// array of the class
var dataForBinding = boxesArray.select(val => new PropertyContainer
{ Value = val });
このデータをグリッドビューにバインドすると、完全に機能します。