18/03/29 23:18:05.53 cCEUqbyZ.net
>>617
やると↓
$a=Get-ChildItem "D:\test\*.*" -include *.txt,*.dat
$b=Get-ChildItem "G:\test\*.*" -include *.txt,*.dat
@($a; $b) | Group-Object -Property Name | Where-Object { $_.Count -eq 2 } | Foreach-Object { $_.Name;
ompare-Object -ReferenceObject $(Get-Content $_.Group[0].Fullname) -DifferenceObject $(Get-Content $_.Group[1].Fullname
| Format-Table }
b.txt
Compare-Object : 引数が null であるため、パラメーター 'ReferenceObject' にバインドできません。
発生場所 行:1 文字:134
+ @($a; $b) | Group-Object -Property Name | Where-Object { $_.Count -eq 2 } | Foreach-Object { $_.Name; Compare-Object
-ReferenceObject <<<< $(Get-Content $_.Group[0].Fullname) -DifferenceObject $(Get-Content $_.Group[1].Fullname) | Form
at-Table }
+ CategoryInfo : InvalidData: (:) [Compare-Object]、ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.CompareObje
ctCommand