it-source

Powershell get-event 로그 메시지 열이 너무 짧습니다.

criticalcode 2023. 11. 7. 20:57
반응형

Powershell get-event 로그 메시지 열이 너무 짧습니다.

powershell을 사용하여 이벤트에 대한 정보를 검색하는 경우 메시지 열이 잘려지고 너무 짧습니다.

인덱스 시간 유형 원본 이벤트아이디 메시지
----- ---- ---- ------ ------- -------
2 Sept 18 12:50 Info yadday adda 0 Class : 컨트롤러바스켓 컨트롤러...
1 Sept 18 12:50 Info yadday adda 0 Class : 컨트롤러바스켓 컨트롤러...

전체 메시지를 볼 수 있습니까?

유형에 대한 기본 테이블 형식이 표시됩니다(이 형식은 설치 중 하나에 정의됩니다).x.format.ps1.xml파일).

할 수 있습니다.

  • 더 넓은 콘솔 창을 사용하면 마지막 열이 사용 가능한 공간을 채웁니다.
  • 더하다format-table -wrap파이프라인의 끝까지 PSH가 마지막 열의 텍스트를 래핑합니다.
  • 더하다format-table -auto파이프라인 끝까지 PSH가 모든 열을 적합하게 조정합니다(그러나 모든 데이터를 먼저 봐야 결과가 증분되지 않습니다).
  • 둘다 사용-auto그리고.-wrap.
  • 원하는 테이블 형식을 지정합니다.표시할 속성 목록을 지정합니다.또는 열을 정의하는 해시 목록(이 경우 각각 고유한 레이블, 정렬, 너비 및 표현식을 가질 수 있음)을 참조하십시오.help format-table -full자세한 것은

위에서 제안한 방법 외에 다음과 같은 방법을 사용할 수 있습니다.-ExpandProperty오류 메시지만 추출하려면 다음과 같이 하십시오.

Get-EventLog -LogName Application -Newest 10 -EntryType Warning | select -ExpandProperty message

이렇게 하면 전체 오류 메시지가 추출됩니다.

형식-목록에 연결합니다.

Just Open the Command Prompt window and click on the leftmost top corner.
>Select Properties
>Go to Layouts tab
>Increase the width and height of the Screen Buffer size and Window size.

이거 됩니다.

언급URL : https://stackoverflow.com/questions/1443569/powershell-get-eventlog-message-column-is-too-short

반응형