저는 powershell의 초보자이며 간단한 문제가 무엇인지 의심합니다. 다음 명령을 수행하려고하지만 결과적으로 아무것도 반환하지 않으며 이유를 이해할 수 없습니다.powershell select-string이 올바르게 작동하지 않습니다.
bcdedit의 현재 섹션에 대한 설명을 얻으려고합니다. 내가 할 경우
bcdedit /enum | select-string "identifier.*current" -context 0,3
그것은 다음 반환
> identifier {current}
device partition=C:
path \WINDOWS\system32\winload.exe
description Windows 8.1
왜하지 않습니다 다음 반환 description Windows 8.1
?
bcdedit /enum | select-string "identifier.*current" -context 0,3 | select-string "description"
대신 아무것도 반환하지 않습니다.
이 정보에 감사드립니다.
또는 약간 간단하고 다시 검색을 선택 문자열 몇 가지 문자열을주고 -stream''아웃 문자열을 사용할 수'BCDEDIT/열거 | select-string "identifier. * current"- 텍스트 0,3 | Out-String - 스트림 | Select-String "description"' –