$beginDate = Get-Date -Date "2016/07/01"
$endDate = Get-Date -Date "2017/04/01"
#$a = @("taro1","jiro2","3ro","4ro","taro1","jiro2","taro1","jiro2","jiro2")
$a = Get-EventLog application -After $beginDate -Before $endDate | Where-Object { $_.EntryType -eq "Error" }
#$b = @(foreach($v in $a){ $v })
# 自分のディレクトリ
cd @@@@@
for ($i=0; $i -lt $a.Length; $i++){
$a | ? {
if(($a.Message -eq $_.Message).count -ge 2){
$_
}
} | sort | gu | out-file ./result.txt -encoding default
}
#http://d.hatena.ne.jp/sinjyama/20100817/1282035684
[0回]
PR