我正在尝试在Windows 2003 Server上使用此power shell 1脚本来延长事件时间。
正确的语法是什么?
$actions = (Get-EventLog -LogName "Application" -Message "*Succeeded*" -After (Get-Date).AddMinutes(-80))
if ($actions){
ForEach($action in $actions){
$Result = "Done - Job COMPLETED OK at ***** EVENT TIME HERE *****"
Write-Host $Result
Exit 0
}