Featured image of post [PowerShell] 69. Start-Transcript — 세션 기록

[PowerShell] 69. Start-Transcript — 세션 기록

Start-Transcript로 PowerShell 세션의 입력·출력 전체를 텍스트 파일로 기록하는 법과 -Path/-Append/-IncludeInvocationHeader 매개변수, Stop-Transcript와의 관계, 프로필에 등록해 세션 전체를 기록하는 법을 정리한 챕터다.

Featured image of post [PowerShell] 70. Set-PSBreakpoint — 스크립트 디버깅

[PowerShell] 70. Set-PSBreakpoint — 스크립트 디버깅

Set-PSBreakpoint로 스크립트에 줄/명령/변수 단위 브레이크포인트를 거는 법과 -Action 매개변수로 조건부 중단을 만드는 법, Get-PSBreakpoint/Remove-PSBreakpoint로 관리하는 법을 정리한 Part 7 마지막 챕터다.

Featured image of post [PowerShell] 71. Pester 소개 — Describe/It/Should

[PowerShell] 71. Pester 소개 — Describe/It/Should

PowerShell 표준 테스트 프레임워크 Pester의 Describe/Context/It 블록 구조와 Should 어서션으로 함수 동작을 검증하는 법, BeforeAll로 테스트 대상 함수를 불러오는 법을 정리한 Part 8 시작 챕터다.

Featured image of post [PowerShell] 73. Measure-Command — 성능 측정과 벤치마킹

[PowerShell] 73. Measure-Command — 성능 측정과 벤치마킹

Measure-Command로 스크립트 블록 실행 시간을 TimeSpan으로 측정하는 법과 -Expression이 현재 스코프에서 실행되는 부작용, 결과가 화면에 표시되지 않는 이유, 여러 구현을 비교 벤치마킹하는 법을 정리한 Part 8 마지막 챕터다.

Featured image of post [PowerShell] 75. Import-Module/Get-Module/Remove-Module

[PowerShell] 75. Import-Module/Get-Module/Remove-Module

PowerShell 모듈 자동 로딩(module autoloading) 원리와 Import-Module로 수동 임포트하는 법, Get-Module -ListAvailable로 설치된 모듈을 찾는 법, Remove-Module로 세션에서 제거하는 법을 정리한 챕터다.

Featured image of post [PowerShell] 77. PowerShell 클래스(class 키워드)

[PowerShell] 77. PowerShell 클래스(class 키워드)

PowerShell 5.0+ class 키워드로 사용자 정의 타입을 만드는 법과 프로퍼티·생성자·메서드 문법, 정적(static) 멤버, 27장 PSCustomObject와의 차이, ForEach-Object -Parallel에서 클래스를 안전하게 쓰는 법을 정리한 챕터다.