Featured image of post [PowerShell] 36. Remove-Item — 삭제

[PowerShell] 36. Remove-Item — 삭제

Remove-Item으로 파일·디렉터리·레지스트리 키를 삭제하는 법과 -Recurse의 알려진 이슈, 디렉터리 삭제 시 -Confirm:$false로도 우회되지 않는 확인 프롬프트, -Stream으로 대체 데이터 스트림만 지우는 법을 정리한 챕터다.

Featured image of post [PowerShell] 38. Get-ItemProperty/Set-ItemProperty

[PowerShell] 38. Get-ItemProperty/Set-ItemProperty

Get-ItemProperty로 파일 속성이나 레지스트리 값을 조회하는 법과 Set-ItemProperty로 값을 만들거나 바꾸는 법, Get-Item이 보여주지 않는 레지스트리 값이 왜 ItemProperty로 따로 분리돼 있는지를 정리한 챕터다.

Featured image of post [PowerShell] 39. Test-Path — 경로 존재 확인

[PowerShell] 39. Test-Path — 경로 존재 확인

Test-Path로 경로 존재 여부를 확인하는 법과 -PathType으로 파일/디렉터리를 구분하는 법, -IsValid로 문법만 검사하는 법, $null·빈 문자열 입력 시 반환값 차이, 레지스트리 값 확인의 함정을 정리한 챕터다.

Featured image of post [PowerShell] 41. 변수와 데이터 타입

[PowerShell] 41. 변수와 데이터 타입

PowerShell 변수 이름 규칙과 $ 접두사, [int]·[string] 같은 타입 제약(type-constrain) 문법, 변수 스코프의 기본 개념, Variable: 프로바이더로 변수를 항목처럼 다루는 법을 정리한 Part 5 시작 챕터다.

Featured image of post [PowerShell] 42. 배열과 컬렉션 기초

[PowerShell] 42. 배열과 컬렉션 기초

PowerShell 배열 @() 생성 문법과 인덱싱, 음수 인덱스, 범위 슬라이싱, .ForEach()/.Where() 메서드, Count/Length 속성, 다차원 배열과 재정렬 배열(jagged array)의 차이를 정리한 챕터다.

Featured image of post [PowerShell] 43. ArrayList와 Generic List(List<T>)

[PowerShell] 43. ArrayList와 Generic List(List<T>)

42장 배열의 += 성능 문제를 해결하는 System.Collections.ArrayList와 System.Collections.Generic.List<T>의 Add/Remove 메서드 사용법, 두 컬렉션의 타입 안전성 차이, 언제 배열 대신 이들을 선택해야 하는지 정리한 챕터다.

Featured image of post [PowerShell] 44. 해시테이블(Hashtable) 다루기

[PowerShell] 44. 해시테이블(Hashtable) 다루기

PowerShell 해시테이블 @{} 생성 문법과 키-값 접근법, [ordered]@{}로 순서를 보존하는 법, Keys/Values 속성과 GetEnumerator()로 순회하는 법, ConvertFrom-StringData로 텍스트를 해시테이블로 바꾸는 법을 정리한 챕터다.

Featured image of post [PowerShell] 45. 문자열 서식과 Here-String

[PowerShell] 45. 문자열 서식과 Here-String

작은따옴표와 큰따옴표의 문자열 전개(interpolation) 차이, 이스케이프 문자 백틱(`), -f 서식 연산자, 여러 줄 텍스트를 다루는 Here-String(@"..."@) 문법을 정리한 PowerShell 문자열 서식 챕터다.