티스토리 뷰

텍스트 파일에서 특정 단어만으로 필터링하거나 해당 단어만 제외시켜 편집하고자 할때 사용


Select-String -Path .\<SourceFile> -Pattern "<String>" | Format-Table Line -AutoSize | Out-String -Width 4096 |Out-File .\<TargetFile>

 

Select-String -Path .\<SourceFile> -NotMatch "<String>" | Format-Table Line -AutoSize | Out-String -Width 4096 |Out-File .\<TargetFile>


'Windows Server > PowerShell' 카테고리의 다른 글

파워쉘을 이용한 도메인 사용자 관리 #1  (1) 2015.03.15
User - SID  (0) 2014.05.21
댓글
글 보관함
최근에 달린 댓글
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Total
Today
Yesterday