ISEOptions 객체는 Windows PowerShell ISE의 다양한 설정을 나타냅니다. Microsoft.PowerShell.Host.ISE.ISEOptions 클래스의 인스턴스입니다.
ISEOptions 객체는 다음과 같은 메서드와 속성을 제공합니다.
메서드
RestoreDefaultConsoleTokenColors()
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
콘솔 창에서 토큰 색상의 기본 값을 복원합니다.
# Changes the color of the commands in the Console pane to red and then restores
# it to its default value.
$psISE.Options.ConsoleTokenColors["Command"] = 'red'
$psISE.Options.RestoreDefaultConsoleTokenColors()
RestoreDefaults()
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에서 모든 옵션 설정의 기본값을 복원합니다. 또한 메시지가 다시 나타나지 않도록 표준 체크박스를 제공하는 다양한 경고 메시지의 동작을 초기화합니다.
# Changes the background color in the Console pane and then restores it to its default value.
$psISE.Options.ConsolePaneBackgroundColor = 'orange'
$psISE.Options.RestoreDefaults()
RestoreDefaultTokenColors()
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
스크립트 창에서 토큰 색상의 기본 값을 복원합니다.
# Changes the color of the comments in the Script pane to red and then restores it
# to its default value.
$psISE.Options.TokenColors["Comment"] = 'red'
$psISE.Options.RestoreDefaultTokenColors()
RestoreDefaultXmlTokenColors()
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
Windows PowerShell ISE에서 표시되는 XML 요소의 토큰 색상 기본값을 복원합니다. 또한 XmlTokenColors도 참고하세요.
# Changes the color of the comments in XML data to red and then restores it
# to its default value.
$psISE.Options.XmlTokenColors["Comment"] = 'red'
$psISE.Options.RestoreDefaultXmlTokenColors()
속성
AutoSaveMinuteInterval
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
Windows PowerShell ISE에서 파일 자동 저장 작업 간격을 지정합니다. 기본 시간은 2분입니다. 값은 정수입니다.
# Changes the number of minutes between automatic save operations to every 3 minutes.
$psISE.Options.AutoSaveMinuteInterval = 3
커맨드페인배경색
이 기능은 Windows PowerShell ISE 2.0에 존재하지만, 이후 버전의 ISE에서는 제거되거나 이름이 변경되었습니다. 후속 버전은 ConsolePaneBackgroundColor를 참조하세요.
명령 창의 배경색을 지정합니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Changes the background color of the Command pane to orange.
$psISE.Options.CommandPaneBackgroundColor = 'orange'
커맨드판업
이 기능은 Windows PowerShell ISE 2.0에 존재하지만, 이후 버전의 ISE에서는 제거되거나 이름이 변경되었습니다.
명령 창이 출력 창 위에 있는지 지정합니다.
# Moves the Command pane to the top of the screen.
$psISE.Options.CommandPaneUp = $true
콘솔 창 배경색
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
콘솔 창의 배경색을 지정합니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Changes the background color of the Console pane to red.
$psISE.Options.ConsolePaneBackgroundColor = 'red'
콘솔 창 전경 색상
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
콘솔 창에서 텍스트의 전경 색상을 지정합니다.
# Changes the foreground color of the text in the Console pane to yellow.
$psISE.Options.ConsolePaneForegroundColor = 'yellow'
콘솔 창문텍스트배경색
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
콘솔 창에서 텍스트의 배경색을 지정합니다.
# Changes the background color of the Console pane text to pink.
$psISE.Options.ConsolePaneTextBackgroundColor = 'pink'
콘솔토큰색상
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
Windows PowerShell ISE 콘솔 창에서 IntelliSense 토큰의 색상을 지정합니다. 이 속성은 콘솔 창에 토큰 유형과 색상의 이름/값 쌍을 포함하는 사전 객체입니다. 스크립트 창에서 IntelliSense 토큰의 색상을 변경하려면 TokenColors를 참조하세요. 색상을 기본값으로 재설정하려면 RestoreDefaultConsoleTokenColors를 참조하세요. 토큰 색상은 다음과 같은 것에 대해 설정할 수 있습니다: Attribute, Command, CommandArgumentCommandParameterCommentGroupEndGroupStartKeywordLineContinuationLoopLabelMemberNewLineNumberOperatorPositionStatementSeparatorStringTypeUnknownVariable.
# Sets the color of commands to green.
$psISE.Options.ConsoleTokenColors["Command"] = 'green'
# Sets the color of keywords to magenta.
$psISE.Options.ConsoleTokenColors["Keyword"] = 'magenta'
디버그 배경색
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에 나타나는 디버그 텍스트의 배경색을 지정합니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Changes the background color for the debug text that appears in the Console pane
# to blue.
$psISE.Options.DebugBackgroundColor = '#0000FF'
디버그 전경 색상
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에 나타나는 디버그 텍스트의 전경 색상을 지정합니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Changes the foreground color for the debug text that appears in the Console
# pane to yellow.
$psISE.Options.DebugForegroundColor = 'yellow'
기본 옵션
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
리셋 메서드를 사용할 때 사용할 기본 값을 지정하는 속성들의 집합입니다.
# Displays the name of the default options. This example is from ISE 4.0.
$psISE.Options.DefaultOptions
SelectedScriptPaneState : Top
ShowDefaultSnippets : True
ShowToolBar : True
ShowOutlining : True
ShowLineNumbers : True
TokenColors : {[Attribute, #FF00BFFF], [Command, #FF0000FF],
[CommandArgument, #FF8A2BE2], [CommandParameter, #FF000080]...}
ConsoleTokenColors : {[Attribute, #FFB0C4DE], [Command, #FFE0FFFF],
[CommandArgument, #FFEE82EE], [CommandParameter, #FFFFE4B5]...}
XmlTokenColors : {[Comment, #FF006400], [CommentDelimiter, #FF008000],
[ElementName, #FF8B0000], [MarkupExtension, #FFFF8C00]...}
DefaultOptions : Microsoft.PowerShell.Host.ISE.ISEOptions
FontSize : 9
Zoom : 100
FontName : Lucida Console
ErrorForegroundColor : #FFFF9494
ErrorBackgroundColor : #00FFFFFF
WarningForegroundColor : #FFFF8C00
WarningBackgroundColor : #00FFFFFF
VerboseForegroundColor : #FF00FFFF
VerboseBackgroundColor : #00FFFFFF
DebugForegroundColor : #FF00FFFF
DebugBackgroundColor : #00FFFFFF
ConsolePaneBackgroundColor : #FF012456
ConsolePaneTextBackgroundColor : #FF012456
ConsolePaneForegroundColor : #FFF5F5F5
ScriptPaneBackgroundColor : #FFFFFFFF
ScriptPaneForegroundColor : #FF000000
ShowWarningForDuplicateFiles : True
ShowWarningBeforeSavingOnRun : True
UseLocalHelp : True
AutoSaveMinuteInterval : 2
MruCount : 10
ShowIntellisenseInConsolePane : True
ShowIntellisenseInScriptPane : True
UseEnterToSelectInConsolePaneIntellisense : True
UseEnterToSelectInScriptPaneIntellisense : True
에러배경색
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에 나타나는 오류 텍스트의 배경색을 지정합니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Changes the background color for the error text that appears in the Console pane to black.
$psISE.Options.ErrorBackgroundColor = 'black'
ErrorForegroundColor(전경색)
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에 나타나는 오류 텍스트의 전경 색상을 지정합니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Changes the foreground color for the error text that appears in the console pane to green.
$psISE.Options.ErrorForegroundColor = 'green'
폰트 이름
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
스크립트 창과 콘솔 창 모두에서 현재 사용 중인 폰트 이름을 지정합니다.
# Changes the font used in both panes.
$psISE.Options.FontName = 'Courier New'
글꼴 크기
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
정수로 글꼴 크기를 지정합니다. 스크립트 창, 명령 창, 출력 창에서 사용됩니다. 유효한 범위는 8부터 32까지입니다.
# Changes the font size in all panes.
$psISE.Options.FontSize = 20
인텔리센스 타임아웃 인초
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
현재 입력된 텍스트를 해석하려고 IntelliSense가 사용하는 초수를 지정합니다. 이 시간이 지나면 IntelliSense가 타임아웃되어 타이핑을 계속할 수 있게 됩니다. 기본 값은 3초입니다. 값은 정수입니다.
# Changes the number of seconds for IntelliSense syntax recognition to 5.
$psISE.Options.IntellisenseTimeoutInSeconds = 5
므루카운트
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
Windows PowerShell ISE가 최근에 열었던 파일 수를 지정하여 파일 열기 메뉴 하단에 표시합니다. 기본값은 10입니다. 값은 정수입니다.
# Changes the number of recently used files that appear at the bottom of the
# File Open menu to 5.
$psISE.Options.MruCount = 5
OutputPaneBackgroundColor
이 기능은 Windows PowerShell ISE 2.0에 존재하지만, 이후 버전의 ISE에서는 제거되거나 이름이 변경되었습니다. 후속 버전은 ConsolePaneBackgroundColor를 참조하세요.
출력 창 자체의 배경색을 받거나 설정하는 읽기/쓰기 속성입니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Changes the background color of the Output pane to gold.
$psISE.Options.OutputPaneForegroundColor = 'gold'
출력창문텍스트전경색상
이 기능은 Windows PowerShell ISE 2.0에 존재하지만, 이후 버전의 ISE에서는 제거되거나 이름이 변경되었습니다. 이후 버전은 ConsolePaneForegroundColor를 참조하세요.
Windows PowerShell ISE 2.0의 출력 창에서 텍스트의 전경 색상을 변경하는 읽기/쓰기 속성입니다.
# Changes the foreground color of the text in the Output Pane to blue.
$psISE.Options.OutputPaneTextForegroundColor = 'blue'
OutputPaneTextBackgroundColor
이 기능은 Windows PowerShell ISE 2.0에 존재하지만, 이후 버전의 ISE에서는 제거되거나 이름이 변경되었습니다. 이후 버전은 ConsolePaneTextBackgroundColor를 참조하세요.
출력 창에서 텍스트의 배경색을 바꾸는 읽기/쓰기 속성입니다.
# Changes the background color of the Output pane text to pink.
$psISE.Options.OutputPaneTextBackgroundColor = 'pink'
스크립트 창 배경색
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
파일의 배경색을 받거나 설정하는 읽기/쓰기 속성입니다. System.Windows.Media.Color 클래스의 인스턴스입니다.
# Sets the color of the script pane background to yellow.
$psISE.Options.ScriptPaneBackgroundColor = 'yellow'
스크립트 창 전경 색상
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
스크립트 창에서 비스크립트 파일의 전경 색상을 받거나 설정하는 읽기/쓰기 속성입니다. 스크립트 파일의 전경 색상을 설정하려면 TokenColors를 사용하세요.
# Sets the foreground to color of non-script files in the script pane to green.
$psISE.Options.ScriptPaneBackgroundColor = 'green'
SelectedScriptPaneState
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
디스플레이에서 스크립트 창의 위치를 얻거나 설정하는 읽기/쓰기 속성입니다. 문자열은 '최대화(Maximized)', '상단(Top)', 또는 '오른쪽(Right)' 중 하나일 수 있습니다.
# Moves the Script Pane to the top.
$psISE.Options.SelectedScriptPaneState = 'Top'
# Moves the Script Pane to the right.
$psISE.Options.SelectedScriptPaneState = 'Right'
# Maximizes the Script Pane
$psISE.Options.SelectedScriptPaneState = 'Maximized'
ShowDefaultSnippets
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
Ctrl+J 스니펫 목록에 Windows PowerShell에 포함된 스타터 세트가 포함되는지 명시합니다. 로 설정 $false하면 Ctrl+J 리스트에는 사용자 정의 스니펫만 나타납니다. 기본값은 $true입니다.
# Hide the default snippets from the Ctrl+J list.
$psISE.Options.ShowDefaultSnippets = $false
ShowIntellisenseInConsolePane
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
IntelliSense가 콘솔 창에서 문법, 매개변수, 값 제안을 제공하는지 명시합니다.
기본값은 $true입니다.
# Turn off IntelliSense in the console pane.
$psISE.Options.ShowIntellisenseInConsolePane = $false
ShowIntellisenseInScriptPane
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
스크립트 창에서 IntelliSense가 구문, 매개변수, 값 제안을 제공하는지 명시합니다.
기본값은 $true입니다.
# Turn off IntelliSense in the Script pane.
$psISE.Options.ShowIntellisenseInScriptPane = $false
쇼라인넘버스
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
스크립트 창이 왼쪽 여백에 줄 번호를 표시하는지 지정합니다. 기본값은 $true입니다.
# Turn off line numbers in the Script pane.
$psISE.Options.ShowLineNumbers = $false
쇼 개요
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
스크립트 창이 왼쪽 여백의 코드 섹션 옆에 확장 가능 및 접이식 괄호를 표시하는지 지정합니다. 표시가 나오면 텍스트 블록 옆의 마이너스 - 아이콘을 클릭하면 접히거나, 플러스 + 아이콘을 클릭하면 텍스트 블록을 확장할 수 있습니다. 기본값은 $true입니다.
# Turn off outlining in the Script pane.
$psISE.Options.ShowOutlining = $false
쇼툴바
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
ISE 툴바가 Windows PowerShell ISE 창 상단에 나타나는지 지정합니다. 기본값은 $true입니다.
# Show the toolbar.
$psISE.Options.ShowToolBar = $true
ShowWarningSavingOnRun 전에
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
스크립트가 실행되기 전에 자동으로 저장될 때 경고 메시지가 나타나는지 여부를 지정합니다.
기본값은 $true입니다.
# Enable the warning message when an attempt
# is made to run a script without saving it first.
$psISE.Options.ShowWarningBeforeSavingOnRun = $true
중복 파일 경고 표시
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
동일한 파일을 다른 PowerShell 탭에서 열 때 경고 메시지가 나타나는지 명시합니다. 로 설정 $true하면 같은 파일을 여러 탭에서 열려면 다음과 같은 메시지가 표시됩니다: "이 파일의 복사본이 다른 Windows PowerShell 탭에서 열려 있습니다. 이 파일에 가해진 변경 사항은 모든 열린 복사본에 영향을 미칩니다." 기본 값은 $true입니다.
# Enable the warning message when a file is
# opened in multiple PowerShell tabs.
$psISE.Options.ShowWarningForDuplicateFiles = $true
토큰컬러스
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
Windows PowerShell ISE 스크립트 창에서 IntelliSense 토큰의 색상을 지정합니다. 이 속성은 스크립트 창에 토큰 유형과 색상의 이름/값 쌍을 포함하는 사전 객체입니다. 콘솔 창에서 IntelliSense 토큰의 색상을 변경하려면 ConsoleTokenColors를 참조하세요. 색상을 기본값으로 재설정하려면 RestoreDefaultTokenColors를 참조하세요. 토큰 색상은 다음과 같이 설정할 수 있습니다: 속성, 명령어, 명령 인수, 명령 매개변수, 주석, 그룹엔드, 그룹스타트, 키워드, 라인 연속성, 루프라벨, 멤버, 새 줄, 숫자, 연산자, 위치, 문장구분자, 문자열, 타입, 알 수 없음, 변수.
# Sets the color of commands to green.
$psISE.Options.TokenColors["Command"] = "green"
# Sets the color of keywords to magenta.
$psISE.Options.TokenColors["Keyword"] = "magenta"
UseEnterToSelectInConsolePaneIntellisense
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
콘솔 창에서 IntelliSense 제공 옵션을 선택할 수 있는지 Enter키를 사용할 수 있는지 명시합니다. 기본값은 $true입니다.
# Turn off using the ENTER key to select an IntelliSense provided option in the Console pane.
$psISE.Options.UseEnterToSelectInConsolePaneIntellisense = $false
UseEnterToSelectInScriptPaneIntellisense
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
스크립트 창에서 IntelliSense 제공 옵션을 선택할 수 있는지 Enter키를 사용할 수 있는지 지정합니다. 기본값은 $true입니다.
# Turn on using the Enter key to select an IntelliSense provided option in the Console pane.
$psISE.Options.UseEnterToSelectInConsolePaneIntellisense = $true
UseLocalHelp
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
키워드에 마우스를 올린 상태에서 F1 키를 눌렀을 때 로컬 설치된 도움말 또는 온라인 도움말 중 어느 메시지가 나타날지 지정합니다. 로 설정 $true하면 팝업 창이 로컬에 설치된 도움말 콘텐츠를 보여줍니다. 도움말 파일은 명령어를 실행 Update-Help 하면 설치할 수 있습니다. 로 설정 $false하면 브라우저가 Microsoft Learn 페이지로 열립니다.
# Sets the option for the online help to be displayed.
$psISE.Options.UseLocalHelp = $false
# Sets the option for the local Help to be displayed.
$psISE.Options.UseLocalHelp = $true
Verbose배경색
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에 나타난 장황한 텍스트의 배경색을 지정합니다. System.Windows.Media.Color 객체입니다.
# Changes the background color for verbose text to blue.
$psISE.Options.VerboseBackgroundColor ='#0000FF'
VerboseForegroundColor(장황한 전경색)
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에 나타난 장황한 텍스트의 전경 색상을 지정합니다. System.Windows.Media.Color 객체입니다.
# Changes the foreground color for verbose text to yellow.
$psISE.Options.VerboseForegroundColor = 'yellow'
경고배경색
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
콘솔 창에 나타나는 경고 텍스트의 배경색을 지정합니다. System.Windows.Media.Color 객체입니다.
# Changes the background color for warning text to blue.
$psISE.Options.WarningBackgroundColor = '#0000FF'
경고 전경색
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
출력 창에 나타나는 경고 텍스트의 전경 색상을 지정합니다. System.Windows.Media.Color 객체입니다.
# Changes the foreground color for warning text to yellow.
$psISE.Options.WarningForegroundColor = 'yellow'
XmlTokenColors
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
Windows PowerShell ISE에서 표시되는 XML 콘텐츠의 이름/값 쌍, 토큰 유형, 색상을 포함하는 사전 객체를 지정합니다. 토큰 색상은 다음과 같이 설정할 수 있습니다: 속성, 명령어, 명령 인수, 명령 매개변수, 주석, 그룹엔드, 그룹스타트, 키워드, 라인 연속성, 루프라벨, 멤버, 새 줄, 숫자, 연산자, 위치, 문장구분자, 문자열, 타입, 알 수 없음, 변수. 또한 RestoreDefaultXmlTokenColors도 참고하세요.
# Sets the color of XML element names to green.
$psISE.Options.XmlTokenColors["ElementName"] = 'green'
# Sets the color of XML comments to magenta.
$psISE.Options.XmlTokenColors["Comment"] = 'magenta'
확대/축소
Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.
콘솔과 스크립트 창 모두에서 텍스트의 상대적 크기를 지정합니다. 기본값은 100입니다. 값이 작을수록 Windows PowerShell ISE에서 텍스트가 더 작게 보이고, 숫자가 클수록 텍스트가 더 커 보입니다. 값은 20에서 400 사이의 정수입니다.
# Changes the text in the Windows PowerShell ISE to be double its normal size.
$psISE.Options.Zoom = 200