2
My $var
変数はリモートコンピュータでは機能しません。私はこのリンクのようなフィルターを使用しますIn powershell passing variable to where-object not working。しかし、まだ私のスクリプトは私の入力からアプリを見つけることができません。オブジェクトを渡す変数がブロックスクリプトで機能しない
$var = "application"
Invoke-command -ComputerName $cpu {
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* ,
HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object {$_.DisplayName -like "*$var*"}
今の仕事。ありがとうございました。 – cinq2