Aracılığıyla paylaş


ISEOptions Nesnesi

ISEOptions nesnesi, Windows PowerShell ISE için çeşitli ayarları temsil eder. Microsoft.PowerShell.Host.ISE.ISEOptions sınıfının bir örneğidir.

ISEOptions nesnesi aşağıdaki yöntemleri ve özellikleri sağlar.

Yöntemler

RestoreDefaultConsoleTokenColors()

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Konsol bölmesindeki belirteç renklerinin varsayılan değerlerini geri yükler.

# 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 ve sonraki sürümlerde desteklenir.

Konsol bölmesindeki tüm seçenek ayarlarının varsayılan değerlerini geri yükler. Ayrıca, iletinin yeniden gösterilmesini önlemek için standart onay kutusunu sağlayan çeşitli uyarı iletilerinin davranışını da sıfırlar.

# 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 ve sonraki sürümlerde desteklenir.

Betik bölmesindeki belirteç renklerinin varsayılan değerlerini geri yükler.

# 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 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Windows PowerShell ISE'de görüntülenen XML öğeleri için belirteç renklerinin varsayılan değerlerini geri yükler. Ayrıca bkz. 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()

Properties

AutoSaveMinuteInterval

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Windows PowerShell ISE tarafından dosyalarınızın otomatik kaydetme işlemleri arasındaki dakika sayısını belirtir. Varsayılan değer 2 dakikadır. Değer bir tamsayıdır.

# Changes the number of minutes between automatic save operations to every 3 minutes.
$psISE.Options.AutoSaveMinuteInterval = 3

CommandPaneBackgroundColor

Bu özellik Windows PowerShell ISE 2.0'da mevcuttur, ancak ISE'nin sonraki sürümlerinde kaldırılmıştır veya yeniden adlandırılmıştır. Sonraki sürümler için bkz . ConsolePaneBackgroundColor.

Komut bölmesinin arka plan rengini belirtir. System.Windows.Media.Color sınıfının bir örneğidir.

# Changes the background color of the Command pane to orange.
$psISE.Options.CommandPaneBackgroundColor = 'orange'

CommandPaneUp

Bu özellik Windows PowerShell ISE 2.0'da mevcuttur, ancak ISE'nin sonraki sürümlerinde kaldırılmıştır veya yeniden adlandırılmıştır.

Komut bölmesinin Çıkış bölmesinin üzerinde bulunup bulunmadığını belirtir.

# Moves the Command pane to the top of the screen.
$psISE.Options.CommandPaneUp  = $true

ConsolePaneBackgroundColor

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Konsol bölmesinin arka plan rengini belirtir. System.Windows.Media.Color sınıfının bir örneğidir.

# Changes the background color of the Console pane to red.
$psISE.Options.ConsolePaneBackgroundColor = 'red'

ConsolePaneForegroundColor

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Konsol bölmesindeki metnin ön plan rengini belirtir.

# Changes the foreground color of the text in the Console pane to yellow.
$psISE.Options.ConsolePaneForegroundColor  = 'yellow'

ConsolePaneTextBackgroundColor

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Konsol bölmesindeki metnin arka plan rengini belirtir.

# Changes the background color of the Console pane text to pink.
$psISE.Options.ConsolePaneTextBackgroundColor = 'pink'

ConsoleTokenColors

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Windows PowerShell ISE Konsolu bölmesindeki IntelliSense belirteçlerinin renklerini belirtir. Bu özellik, Konsol bölmesi için belirteç türlerinin ve renklerinin ad/değer çiftlerini içeren bir sözlük nesnesidir. Betik bölmesinde IntelliSense belirteçlerinin renklerini değiştirmek için bkz . TokenColors. Renkleri varsayılan değerlere sıfırlamak için bkz . RestoreDefaultConsoleTokenColors. Belirteç renkleri şunlar için ayarlanabilir: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable.

# Sets the color of commands to green.
$psISE.Options.ConsoleTokenColors["Command"] = 'green'
# Sets the color of keywords to magenta.
$psISE.Options.ConsoleTokenColors["Keyword"] = 'magenta'

DebugBackgroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Konsol bölmesinde görüntülenen hata ayıklama metninin arka plan rengini belirtir. System.Windows.Media.Color sınıfının bir örneğidir.

# Changes the background color for the debug text that appears in the Console pane to blue.
$psISE.Options.DebugBackgroundColor = '#0000FF'

DebugForegroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Konsol bölmesinde görüntülenen hata ayıklama metni için ön plan rengini belirtir. System.Windows.Media.Color sınıfının bir örneğidir.

# Changes the foreground color for the debug text that appears in the Console pane to yellow.
$psISE.Options.DebugForegroundColor = 'yellow'

DefaultOptions

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Reset yöntemleri kullanıldığında kullanılacak varsayılan değerleri belirten özellikler koleksiyonu.

# 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                      : #FFFF0000
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
IntellisenseTimeoutInSeconds              : 3

ErrorBackgroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Konsol bölmesinde görüntülenen hata metninin arka plan rengini belirtir. System.Windows.Media.Color sınıfının bir örneğidir.

# 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 ve sonraki sürümlerde desteklenir.

Konsol bölmesinde görüntülenen hata metni için ön plan rengini belirtir. System.Windows.Media.Color sınıfının bir örneğidir.

# Changes the foreground color for the error text that appears in the console pane to green.
$psISE.Options.ErrorForegroundColor = 'green'

Fontname

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Hem Betik bölmesinde hem de Konsol bölmesinde kullanılmakta olan yazı tipi adını belirtir.

# Changes the font used in both panes.
$psISE.Options.FontName = 'Courier New'

FontSize

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Yazı tipi boyutunu tamsayı olarak belirtir. Betik bölmesinde, Komut bölmesinde ve Çıkış bölmesinde kullanılır. Geçerli değer aralığı 8 ile 32 arasındadır.

# Changes the font size in all panes.
$psISE.Options.FontSize = 20

IntellisenseTimeoutInSeconds

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

IntelliSense'in o anda yazılan metni çözümlemek için kullandığı saniye sayısını belirtir. Bu kadar saniye sonra IntelliSense zaman aşımına uğrar ve yazmaya devam edebilirsiniz. Varsayılan değer 3 saniyedir. Değer bir tamsayıdır.

# Changes the number of seconds for IntelliSense syntax recognition to 5.
$psISE.Options.IntellisenseTimeoutInSeconds = 5

MruCount

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Windows PowerShell ISE'nin Dosya Aç menüsünün en altında izlediği ve görüntülediği son açılan dosyaların sayısını belirtir. Varsayılan değer 10'dur. Değer bir tamsayıdır.

# Changes the number of recently used files that appear at the bottom of the File Open menu to 5.
$psISE.Options.MruCount = 5

OutputPaneBackgroundColor

Bu özellik Windows PowerShell ISE 2.0'da mevcuttur, ancak ISE'nin sonraki sürümlerinde kaldırılmıştır veya yeniden adlandırılmıştır. Sonraki sürümler için bkz . ConsolePaneBackgroundColor.

Çıkış bölmesinin arka plan rengini alan veya ayarlayan okuma/yazma özelliği. System.Windows.Media.Color sınıfının bir örneğidir.

# Changes the background color of the Output pane to gold.
$psISE.Options.OutputPaneForegroundColor = 'gold'

OutputPaneTextForegroundColor

Bu özellik Windows PowerShell ISE 2.0'da mevcuttur, ancak ISE'nin sonraki sürümlerinde kaldırılmıştır veya yeniden adlandırılmıştır. Sonraki sürümler için bkz . ConsolePaneForegroundColor.

Windows PowerShell ISE 2.0'da Çıkış bölmesindeki metnin ön plan rengini değiştiren okuma/yazma özelliği.

# Changes the foreground color of the text in the Output Pane to blue.
$psISE.Options.OutputPaneTextForegroundColor  = 'blue'

OutputPaneTextBackgroundColor

Bu özellik Windows PowerShell ISE 2.0'da mevcuttur, ancak ISE'nin sonraki sürümlerinde kaldırılmıştır veya yeniden adlandırılmıştır. Sonraki sürümler için bkz . ConsolePaneTextBackgroundColor.

Çıktı bölmesindeki metnin arka plan rengini değiştiren okuma/yazma özelliği.

# Changes the background color of the Output pane text to pink.
$psISE.Options.OutputPaneTextBackgroundColor = 'pink'

ScriptPaneBackgroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Dosyalar için arka plan rengini alan veya ayarlayan okuma/yazma özelliği. System.Windows.Media.Color sınıfının bir örneğidir.

# Sets the color of the script pane background to yellow.
$psISE.Options.ScriptPaneBackgroundColor = 'yellow'

ScriptPaneForegroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Betik bölmesinde betik olmayan dosyalar için ön plan rengini alan veya ayarlayan okuma/yazma özelliği. Betik dosyalarının ön plan rengini ayarlamak için TokenColors kullanın.

# 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 ve sonraki sürümlerde desteklenir.

Betik bölmesinin ekrandaki konumunu alan veya ayarlayan okuma/yazma özelliği. Dize 'Ekranı Kaplamış', 'Üst' veya 'Sağ' olabilir.

# 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 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

CTRL+J kod parçacıkları listesinin Windows PowerShell'de bulunan başlangıç kümesini içerip içermediğini belirtir. olarak $falseayarlandığında, CTRL+J listesinde yalnızca kullanıcı tanımlı kod parçacıkları görüntülenir. Varsayılan değer şudur: $true.

# Hide the default snippets from the CTRL+J list.
$psISE.Options.ShowDefaultSnippets = $false

ShowIntellisenseInConsolePane

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

IntelliSense'in Konsol bölmesinde söz dizimi, parametre ve değer önerileri sunup sunmadığını belirtir. Varsayılan değer şudur: $true.

# Turn off IntelliSense in the console pane.
$psISE.Options.ShowIntellisenseInConsolePane = $false

ShowIntellisenseInScriptPane

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

IntelliSense'in Betik bölmesinde söz dizimi, parametre ve değer önerileri sunup sunmadığını belirtir. Varsayılan değer şudur: $true.

# Turn off IntelliSense in the Script pane.
$psISE.Options.ShowIntellisenseInScriptPane = $false

ShowLineNumbers

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Betik bölmesinin sol kenar boşluğunda satır numaralarını görüntüleyip görüntülemeyeceğini belirtir. Varsayılan değer şudur: $true.

# Turn off line numbers in the Script pane.
$psISE.Options.ShowLineNumbers = $false

ShowOutlining

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Betik bölmesinin sol kenar boşluğunda kod bölümlerinin yanında genişletilebilir ve daraltılabilir köşeli ayraçlar görüntüleyip görüntülemeyeceğini belirtir. Bunlar görüntülendiğinde, daraltmak için bir metin bloğunun yanındaki eksi - simgelerine veya bir metin bloğunu genişletmek için artı + simgesine tıklayabilirsiniz. Varsayılan değer şudur: $true.

# Turn off outlining in the Script pane.
$psISE.Options.ShowOutlining = $false

Araççubuğunugöster

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

ISE araç çubuğunun Windows PowerShell ISE penceresinin üst kısmında görünüp görünmeyeceğini belirtir. Varsayılan değer şudur: $true.

# Show the toolbar.
$psISE.Options.ShowToolBar = $true

ShowWarningBeforeSavingOnRun

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Betik çalıştırılmadan önce otomatik olarak kaydedildiğinde bir uyarı iletisinin görüntülenip görüntülenmeyeceğini belirtir. Varsayılan değer şudur: $true.

# Enable the warning message when an attempt
# is made to run a script without saving it first.
$psISE.Options.ShowWarningBeforeSavingOnRun = $true

ShowWarningForDuplicateFiles

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Aynı dosya farklı PowerShell sekmelerinde açıldığında bir uyarı iletisinin görünüp görünmeyeceğini belirtir. olarak ayarlanırsa $true, aynı dosyayı birden çok sekmede açmak için şu iletiyi görüntüler: "Bu dosyanın bir kopyası başka bir Windows PowerShell sekmesinde açık. Bu dosyada yapılan değişiklikler tüm açık kopyaları etkileyecek." Varsayılan değerdir $true.

# Enable the warning message when a file is
# opened in multiple PowerShell tabs.
$psISE.Options.ShowWarningForDuplicateFiles = $true

TokenColors

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Windows PowerShell ISE Betik bölmesindeki IntelliSense belirteçlerinin renklerini belirtir. Bu özellik, Betik bölmesi için belirteç türlerinin ve renklerinin ad/değer çiftlerini içeren bir sözlük nesnesidir. Konsol bölmesinde IntelliSense belirteçlerinin renklerini değiştirmek için bkz . ConsoleTokenColors. Renkleri varsayılan değerlere sıfırlamak için bkz . RestoreDefaultTokenColors. Belirteç renkleri şunlar için ayarlanabilir: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable.

# 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 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Konsol bölmesinde Sağlanan IntelliSense seçeneğini seçmek için Enter tuşunu kullanıp kullanamayacağınızı belirtir. Varsayılan değer şudur: $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 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Betik bölmesinde IntelliSense tarafından sağlanan bir seçeneği seçmek için Enter tuşunu kullanıp kullanamayacağınızı belirtir. Varsayılan değer şudur: $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 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

İmleç bir anahtar sözcükte konumlandırılmış şekilde F1 tuşuna bastığınızda yerel olarak yüklenen Yardım'ın mı yoksa çevrimiçi Yardım'ın mı görüntüleneceğini belirtir. olarak ayarlanırsa $true, bir açılır pencere yerel olarak yüklenen Yardım'ın içeriğini gösterir. Komutunu çalıştırarak Update-Help Yardım dosyalarını yükleyebilirsiniz. olarak ayarlanırsa $false, tarayıcınız Microsoft Learn'de bir sayfaya açılır.

# 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

VerboseBackgroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Konsol bölmesinde görüntülenen ayrıntılı metnin arka plan rengini belirtir. Bu bir System.Windows.Media.Color nesnesidir.

# Changes the background color for verbose text to blue.
$psISE.Options.VerboseBackgroundColor ='#0000FF'

VerboseForegroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Konsol bölmesinde görüntülenen ayrıntılı metin için ön plan rengini belirtir. Bu bir System.Windows.Media.Color nesnesidir.

# Changes the foreground color for verbose text to yellow.
$psISE.Options.VerboseForegroundColor = 'yellow'

WarningBackgroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Konsol bölmesinde görüntülenen uyarı metni için arka plan rengini belirtir. Bu bir System.Windows.Media.Color nesnesidir.

# Changes the background color for warning text to blue.
$psISE.Options.WarningBackgroundColor = '#0000FF'

WarningForegroundColor

Windows PowerShell ISE 2.0 ve sonraki sürümlerde desteklenir.

Çıkış bölmesinde görüntülenen uyarı metni için ön plan rengini belirtir. Bu bir System.Windows.Media.Color nesnesidir.

# Changes the foreground color for warning text to yellow.
$psISE.Options.WarningForegroundColor = 'yellow'

XmlTokenColors

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Windows PowerShell ISE'de görüntülenen XML içeriği için belirteç türlerinin ve renklerinin ad/değer çiftlerini içeren bir sözlük nesnesi belirtir. Belirteç renkleri şunlar için ayarlanabilir: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable. Ayrıca bkz . 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'

Zoom

Windows PowerShell ISE 3.0 ve sonraki sürümlerde desteklenir ve önceki sürümlerde mevcut değildir.

Hem Konsol hem de Betik bölmelerindeki metnin göreli boyutunu belirtir. Varsayılan değer 100 şeklindedir. Daha küçük değerler, Windows PowerShell ISE'deki metnin daha küçük görünmesine neden olurken, daha büyük sayılar metnin daha büyük görünmesine neden olur. Değer, 20 ile 400 arasında bir tamsayıdır.

# Changes the text in the Windows PowerShell ISE to be double its normal size.
$psISE.Options.Zoom = 200

Ayrıca bkz: