bug dans le sous-system d'aide V2 ?
salut,
hier, j'ai créer une petite fonction qui permet de lister tous les paramètres qui supportent les wildcards, mais je me suis apercu que parfois le sous-system d'aide fait des siennes..
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| function Use-WildCards($command) {
get-help $command |
select -expand parameters |
foreach { $_.parameter } |
select Name,
@{n='SupportWildCards';e={if($_.globbing -eq $true) {$true} else {$false}}}
} |
voici quelques tests:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| PS II> Use-WildCards -command get-process
name SupportWildCards
---- ----------------
ComputerName False
FileVersionInfo False
Id False
InputObject False
Module False
Name True |
à première vu ça marche, mais:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| PS II> Use-WildCards -command Get-Command
name SupportWildCards
---- ----------------
ArgumentList False
CommandType False
Module False
Name False
Noun False
Syntax False
TotalCount False
Verb False
PS II> Get-Command -Name hel*
CommandType Name Definition
----------- ---- ----------
Function help ...
Application help.exe D:\WINDOWS\system32\help.exe |
le paramètre NAME doit supporter les wildcards mais il retourne FALSE !
es-ce que quelqu'un peux me confirmer si ce "bug" est rectifier en V3 ?