나는 다음과 같은 쿼리를 실행 ...은 Get-WinEvent로 PowerShell을 -FilterXML을
C:\>powershell "Get-WinEvent -FilterXML ""<QueryList><Query><Select Path='System'>*[System[(EventID=1074 or EventID=6013) and TimeCreated[@SystemTime>='2015-01-23T05:00:00.000Z' and @SystemTime<='2015-01-27T17:59:59.999Z']]]</Select></Query></QueryList>" ""
... 나는 표 형식으로 출력 무엇입니까 : 내가 사용하려고 할 때
ProviderName: EventLog
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
1/27/2015 12:00:00 PM 6013 Information The system uptime is 349...
.....
을하지만,
: 선택 - 객체 ...C:\>powershell "Get-WinEvent -FilterXML ""<QueryList><Query><Select Path='System'>*[System[(EventID=1074 or EventID=6013) and TimeCreated[@SystemTime>='2015-01-23T05:00:00.000Z' and @SystemTime<='2015-01-27T17:59:59.999Z']]]</Select></Query></QueryList>" | Select-Object TimeCreated""
을 ... 나는 다음과 같은 오류가 발생합니다
'Select-Object' is not recognized as an internal or external command, operable program or batch file.
왜이 오류가 발생합니까? 나는 Server 2008 Standard Edition, 32-bit에서 이것을 실행하고 있으며, 일반적인 명령 프롬프트를 통해 실행해야합니다.
당신은 이것을 CMD를 통해 실행해야한다고 말합니다. 왜 Powershell에서 직접 실행할 수 있습니까? – SpellingD
이것은 많은 것을 실행하는 큰 스크립트의 작은 부분 일 뿐이며, CMD에서 실행해야합니다. –