Bonjour,
résultat des courses:
pour les 2 syntaxes proposées aucune ne fonctionne.
Pour le test explorer, cela fonctionne.
En cherchant sur le net , j'ai vu que l'on pouvait appeler des méthodes d'objet Com comme ceci mais celà ne fonctionne pas :
$Installer.GetType().InvokeMember("FileHash", "InvokeMethod", $null, $installer, @(($filePath), 0))
1 2 3 4 5 6
| Method invocation failed because [System.__ComObject] does not contain a method named 'StringData'.
At G:\DIVERS\MIG_ORCA\test.ps1:5 char:1
+ $fileHash = $record.StringData(1) + "`t"+ $record.StringData(2) + "`t"+ $record. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound |
Partager