파워셸7 설치방법, 파워셸7 인코딩 UTF-8 설정방법

파워셸7 설치방법, 파워셸7 인코딩 UTF-8 설정방법

아래 페이지에서 파워셸7 다운로드 받기
https://learn.microsoft.com/ko-kr/powershell/scripting/install/install-powershell-on-windows?view=powershell-7.5

또는 아래 URL로 파워셸7 직접 다운로드 받기
PowerShell-7.5.4-win-x64.msi
https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/PowerShell-7.5.4-win-x64.msi

PowerShell-7.5.4-win-x64.msi 실행해서 파워셸 설치.

파워셸 버전확인

$PSVersionTable

파워셸 버전 확인했을 때 7.5.4 버전이 나와야 한다.

현재 인코딩확인

[Console]::OutputEncoding


현재 인코딩확인했을 때 utf-8이 나와야 한다.
949라고 나오면 다음과 같이 설정해야 한다.

# 1. 프로필이 들어갈 폴더 생성
New-Item -ItemType Directory -Force -Path (Split-Path $PROFILE)

# 2. 프로필 파일을 생성
New-Item -ItemType File -Force -Path $PROFILE

# 3. 메모장으로 열기
notepad $PROFILE


아래 3줄 저장 후 닫기

$OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::InputEncoding = [System.Text.Encoding]::UTF8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8


다시 파워셸7 켜서 인코딩 확인해본다.