【最強CUI】PowerShell -Part 2at TECH
【最強CUI】PowerShell -Part 2 - 暇つぶし2ch646:デフォルトの名無しさん
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


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch