次のエラーが表示されますが、なぜ、または何を求めているのかわかりません。
テーブルに表示しようとしているオブジェクトは次のとおりです。
function newURLObject()
{
# param ([String]$Value, [Int]$Count = "1", [String]$IP )
param ([String]$Value, [Int]$Count = "1" )
$obj = new-object PSObject
$obj | add-member -type NoteProperty -Name Value -Value $Value.substring(1)
$obj | add-member -type NoteProperty -Name Count -Value $Count
# $obj | add-member -type NoteProperty -Name IP -Value $IP
return $obj
}
基本的な流れは以下です。
#< Declare Objects>
#< Code to create an array of those objects >
$z = @{Expression={$_.Count};Label="Count";width=5}, @{Expression={$_.Value};Label="URL";count=35}
$y = $listOfRequestedURLs | sort count -descending | select -first 30 | ft $z
Format-Table : Illegal key count
At C:\Temp\parse IIS logs.ps1:231 char:8
+ $y | ft <<<< $z
+ CategoryInfo : InvalidArgument: (:) [Format-Table], NotSupportedException
+ FullyQualifiedErrorId : DictionaryKeyIllegal,Microsoft.PowerShell.Commands.FormatTableCommand
値が配列内にあることはわかっています。しかし、正しく表示されません。format-table なしで表示すると、値フィールドは空として表示されます。