PowerShell générique collections

J'ai été poussée dans le .NET framework dans PowerShell, et j'ai touché quelque chose que je ne comprends pas. Cela fonctionne bien:

$foo = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]"
$foo.Add("FOO", "BAR")
$foo

Key                                                         Value
---                                                         -----
FOO                                                         BAR

Cela ne veut cependant pas:

$bar = New-Object "System.Collections.Generic.SortedDictionary``2[System.String,System.String]"
New-Object : Cannot find type [System.Collections.Generic.SortedDictionary`2[System.String,System.String]]: make sure t
he assembly containing this type is loaded.
At line:1 char:18
+ $bar = New-Object <<<< "System.Collections.Generic.SortedDictionary``2[System.String,System.String]"

Ils sont tous les deux dans la même assemblée, de sorte que ce qui me manque?

Comme il a été indiqué dans les réponses, c'est à peu près seulement, un problème avec PowerShell v1.

InformationsquelleAutor EBGreen | 2008-10-08