标签:
Import-Csv -Path F:\chgpwd\APACHost.CSV | ForEach-Object { "**************" + $_.Hostname + "**************" if($_.OSType -eq ‘Win2003‘) { Get-EventLog -ComputerName $_.hostname -LogName Security -InstanceId 538 -Newest 1 | fl * } else { Get-EventLog -ComputerName $_.hostname -LogName Security -InstanceId 5447 -Newest 1 | fl * } } | Out-Printer -Name "Microsoft XPS Document Writer"
标签:
原文地址:http://www.cnblogs.com/IvanChen/p/4493763.html