Featured image of post [PowerShell] 22. -split/-join 연산자

[PowerShell] 22. -split/-join 연산자

PowerShell -split 연산자로 문자열을 정규식 구분자 기준으로 나누는 법과 -Max-substrings/옵션 매개변수, -join 연산자로 배열을 하나의 문자열로 합치는 법, 단항/이항 형태의 우선순위 차이를 정리한 챕터다.

Featured image of post [PowerShell] 23. 타입 캐스팅과 [type] 접근자

[PowerShell] 23. 타입 캐스팅과 [type] 접근자

[int], [string] 같은 PowerShell 타입 캐스팅 문법과 암시적/명시적 변환 규칙, -is/-isnot/-as 타입 연산자, 숫자 반올림·배열-문자열 변환처럼 자주 놀라는 변환 규칙을 정리한 챕터다.

Featured image of post [PowerShell] 26. -WhatIf/-Confirm과 ShouldProcess

[PowerShell] 26. -WhatIf/-Confirm과 ShouldProcess

위험한 작업을 실행 전에 시뮬레이션하는 -WhatIf, 확인을 요구하는 -Confirm 매개변수의 동작 방식과 $ConfirmPreference 기본 임계값, 직접 만든 함수에 이 매개변수를 추가하는 SupportsShouldProcess를 정리한 챕터다.

Featured image of post [PowerShell] 27. New-Object와 [PSCustomObject]

[PowerShell] 27. New-Object와 [PSCustomObject]

New-Object로 .NET/COM 객체를 생성하는 법과 [PSCustomObject] 타입 가속기로 순서가 보장된 커스텀 객체를 만드는 법, 두 방식의 성능·가독성 차이와 배열 인자를 생성자에 넘길 때의 함정을 정리한 챕터다.

Featured image of post [PowerShell] 30. PSDrive와 프로바이더 개념

[PowerShell] 30. PSDrive와 프로바이더 개념

PowerShell 프로바이더가 레지스트리·인증서·환경변수 같은 서로 다른 데이터 저장소를 파일 시스템처럼 드라이브로 노출하는 원리, 내장 프로바이더 목록, Get-PSDrive/Get-PSProvider로 확인하는 법을 정리한 Part 4 시작 챕터다.