Powershell.exe (v 2.0) 경로
Powershell (버전 2.0)은 어디에 있습니까? Powershell.exe의 경로는 무엇입니까? Windows Server 2008과 Powershell이 설치되어 있습니다. 이 폴더를 보면 :
PS C:\Windows\System32\WindowsPowerShell> dir
Directory: C:\Windows\System32\WindowsPowerShell
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 20.4.2010 17:09 v1.0
Powershell v1.0 만 있습니다. 하지만 내가 입력 할 때
PS C:\> $Host.version
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
PS C:\>
v2.0이 설치되어 있음을 보여줍니다.
나는 그것이 C:\Windows\System32\WindowsPowershell\v1.0\
. 무고한 사람을 혼동하기 위해 MS는 "v1.0"이라는 이름의 디렉토리에 보관했습니다. Windows 7에서 실행하고 $Host.Version
( 설치된 PowerShell 버전 확인)을 통해 버전 번호를 확인하면 2.0으로 표시됩니다.
또 다른 옵션은 $PSVersionTable
명령 프롬프트에서 입력 하는 것입니다. v2.0을 실행중인 경우 출력은 다음과 같습니다.
Name Value
---- -----
CLRVersion 2.0.50727.4927
BuildVersion 6.1.7600.16385
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1
버전 1.0을 실행중인 경우 변수가 존재하지 않으며 출력도 없습니다.
지역화 PowerShell 버전 1.0, 2.0, 3.0, 4.0 :
- 64 비트 버전 : C : \ Windows \ System32 \ WindowsPowerShell \ v1.0 \
- 32 비트 버전 : C : \ Windows \ SysWOW64 \ WindowsPowerShell \ v1.0 \
$ PsHome에 당신이 원하는 정보가있는 것 같아요?
추신.> $ PsHome C : \ Windows \ System32 \ WindowsPowerShell \ v1.0 PS.> Get-Help about_automatic_variables 이야기 about_Automatic_Variables ...
여기에 한 가지 방법이 있습니다 ...
(Get-Process powershell | select -First 1).Path
명령 프롬프트에서 Powershell을 실행 한 것처럼 경로에서 첫 번째 히트를 반환하므로 더 나은 방법이 있습니다.
(Get-Command powershell.exe).Definition
항상 C : \ Windows \ System32 \ WindowsPowershell \ v1.0입니다. 이전 버전과의 호환성을 위해 어딘가에서 들었거나 읽은 것처럼 남겨졌습니다.
참고 URL : https://stackoverflow.com/questions/4145232/path-to-powershell-exe-v-2-0
'Programing' 카테고리의 다른 글
passport.session () 미들웨어는 무엇을합니까? (0) | 2020.08.14 |
---|---|
phpexcel을 사용하여 데이터를 읽고 데이터베이스에 삽입하는 방법은 무엇입니까? (0) | 2020.08.13 |
클래스 메소드를 생성하기 위해 define_method를 어떻게 사용합니까? (0) | 2020.08.13 |
소스 변경시 gunicorn 자동 새로 고침 (0) | 2020.08.13 |
파이썬 사전을 csv 파일에 어떻게 작성합니까? (0) | 2020.08.13 |