명령줄에서 (스크립트가 아닌) PowerShell을 시작하는 방법
저는 PowerShell을 처음 접했는데 간단한 작업이 되어야 한다고 생각하기 때문에 어려움을 겪고 있습니다. 명령줄에서 PowerShell 창을 실행하려고 합니다.
명령줄 인스턴스를 시작하고 다음 중 하나를 입력하면powershell아니면start powershell, 명령줄 인터페이스 내의 PowerShell 인스턴스(즉, 흰색 텍스트의 일반적인 검은색 배경)를 얻고 있습니다.일반적인 PowerShell 인터페이스가 시작되기를 바랍니다. 파란색 바탕에 흰색 텍스트가 표시되어 있습니까?PowerShell 2.0이 설치된 Windows XP를 실행하고 있습니다.
가신다면C:\Windows\system32\Windowspowershell\v1.0(그리고C:\Windows\syswow64\Windowspowershell\v1.0Windows 탐색기에서 두 번 클릭합니다.powershell.exe검은 바탕에 PowerShell을 여는 것을 볼 수 있습니다.바로 가기에 대한 콘솔 속성 때문에 시작 메뉴에서 열었을 때 PowerShell 콘솔이 파란색으로 표시됩니다.powershell.exe기본 속성과 독립적으로 설정할 수 있습니다.
기본 옵션, 글꼴, 색상 및 레이아웃을 설정하려면 PowerShell 콘솔을 열고 를 입력하고 Defaults 메뉴 옵션을 선택합니다.
입니다.start powershellcmd.exe에서 기본 설정을 사용하여 새 콘솔을 시작해야 합니다.
기본 콘솔 색상과 글꼴을 설정합니다.
http://poshcode.org/2220
Windows PowerShell Cookbook(O'Reilly)에서 제공합니다.
Lee Holmes (http://www.leeholmes.com/guide)
Set-StrictMode -Version Latest
Push-Location
Set-Location HKCU:\Console
New-Item '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'
Set-Location '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'
New-ItemProperty . ColorTable00 -type DWORD -value 0x00562401
New-ItemProperty . ColorTable07 -type DWORD -value 0x00f0edee
New-ItemProperty . FaceName -type STRING -value "Lucida Console"
New-ItemProperty . FontFamily -type DWORD -value 0x00000036
New-ItemProperty . FontSize -type DWORD -value 0x000c0000
New-ItemProperty . FontWeight -type DWORD -value 0x00000190
New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000
New-ItemProperty . QuickEdit -type DWORD -value 0x00000001
New-ItemProperty . ScreenBufferSize -type DWORD -value 0x0bb80078
New-ItemProperty . WindowSize -type DWORD -value 0x00320078
Pop-Location
색상 및 창 크기는 바로 가기 LNK 파일로 정의됩니다.당신이 필요로 하는 일을 할 수 있는 방법을 찾은 것 같아요. 시도해 보십시오.
explorer.exe "Windows PowerShell.lnk"
LNK 파일은 모든 사용자 시작 메뉴에 있으며, 사용자가 XP를 사용하는지 Windows 7을 사용하는지에 따라 다른 위치에 있습니다.LNK 파일은 7시에 다음과 같습니다.
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Windows PowerShell
언급URL : https://stackoverflow.com/questions/8670001/how-to-launch-powershell-not-a-script-from-the-command-line
'codememo' 카테고리의 다른 글
| iframe의 내용에 대해 본문 스타일 재정의 (0) | 2023.09.10 |
|---|---|
| 깊이에 상관없이 XDocument에서 이름별 요소 조회 (0) | 2023.09.10 |
| 퍼블릭 도메인 라이센스가 있는 최상의 zip 라이브러리 (0) | 2023.09.10 |
| 도커-컴포지트 빌드와 도커-빌트의 차이점은 무엇입니까? (0) | 2023.09.10 |
| ASCII 문자를 CGKeyCode로 변환하는 방법은? (0) | 2023.09.10 |