PsLogList를 사용하여 일부 이벤트 로그를 가져 오려고합니다. strage 무엇 여기 Powershell 및 외부 .exe (PsLogList) 오류
내가 문제가있는 부분은 ... 나는 그것을 실행 사상 두 번째 시간, 오류 메시지가 없다는 것입니다 :$psloglist = "C:\Users\e-cedric.esch\Downloads\PSTools\PsLogList.exe"
$log = &$psloglist $($serverr) -u $($this.elogusr) -p $($this.elogpwd) -s -x -t \t $($logname)
오류 메시지를 내가 얻을 :
내가 할At C:\Users\systemCESCH\Desktop\test1.ps1:line:38 char:10
+ $log = &$ <<<< psloglist $($serverr) -u $($this.elogusr) -p $($this.elogpwd) -s -x -t \t $($logname)
PsLoglist v2.71 - local and remote event log viewer
Copyright (C) 2000-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
At C:\Users\systemCESCH\Desktop\test1.ps1:line:38 char:10
+ $log = &$ <<<< psloglist $($serverr) -u $($this.elogusr) -p $($this.elogpwd) -s -x -t \t $($logname)
오류 메시지는 내가 디버깅 할 때 :.
Btw는Exception calling "getELog" with "2" argument(s): "Program 'PsLogList.exe' failed to execute: The WriteObject and WriteError methods cannot be called after the pipeline has been closed. Please cont
act Microsoft Support Services.
At C:\Users\systemCESCH\Desktop\test1.ps1:38 char:10
+ $log = & <<<< $psloglist $($serverr) -u $($this.elogusr) -p $($this.elogpwd) -s -x -t \t $($logname)."
At C:\Users\systemCESCH\Desktop\test1.ps1:78 char:34
+ write-output $ELogHandler.getELog <<<< ("PWLU0W987","Application")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ScriptMethodRuntimeException
, 내가 PowerGU을 사용하고 있습니다 I 스크립트 편집기 V 3.8.0.129
powershell에는 이벤트 로그를 쿼리하는 cmdlet이 내장되어 있으므로 외부 프로그램을 사용해야하는 이유가 있습니까? –
어쩌면 어리석은 답변 일 수도 있지만 이전에이 도구를 이미 사용했기 때문에 모든 서버에서 작동한다는 것을 알고 있기 때문에 사용했습니다. (Btw. Get-EventLog 및 Get-WinEvent도 존재하지만 이전에는 사용하지 않았 음을 알고 있습니다.) 문제가 무엇인지 그리고 왜이 오류가 발생했는지 알아 내야 만합니다. ;) – Dobi