시스템 변수 얻기

jy17·2022년 5월 20일
0

0. 환경

  • OS: Windows 10
  • PSVersion(Powershell Version): 5.1.19041.1151

1. 환경변수 얻는 방법

1) cmdlet 사용

# 전체 시스템 변수 얻기
PS C:\Users\admin> Get-ChildItem Env:

# 특정 시스템 변수 얻기(e.g. 시스템 루트)
Get-ChildItem Env:SystemRoot

2) .NetFreamework 함수

# 전체 시스템 변수 얻기
 [System.Environment]::GetEnvironmentVariables()
 

0개의 댓글