Objeto ISEAddOnToolCollection

O objeto ISEAddOnToolCollection é uma coleção de objetos ISEAddOnTool . Um exemplo é o $psISE.CurrentPowerShellTab.VerticalAddOnTools objeto.

Métodos

Add( Nome, ControlType, [IsVisible] )

Com suporte no Windows PowerShell ISE 3.0 e posterior, e não presente em versões anteriores.

Adiciona uma nova ferramenta complementar à coleção. Ele retorna a ferramenta de complemento recém-adicionada. Antes de executar esse comando, você deve instalar a ferramenta complementar no computador local e carregar o assembly.

Name - String Especifica o nome para exibição da ferramenta complementar adicionada ao Windows PowerShell ISE.

ControlType -Type Especifica o controle que é adicionado.

[IsVisible] - Boolean opcional Se definido como $true, a ferramenta de complemento é imediatamente visível no painel de ferramentas associado.

# Load a DLL with an add-on and then add it to the ISE
[reflection.assembly]::LoadFile("c:\test\ISESimpleSolution\ISESimpleSolution.dll")
$psISE.CurrentPowerShellTab.VerticalAddOnTools.Add("Solutions", [ISESimpleSolution.Solution], $true)

Remover( Item )

Com suporte no Windows PowerShell ISE 3.0 e posterior, e não presente em versões anteriores.

Remove a ferramenta de complemento especificada da coleção.

Item - Microsoft.PowerShell.Host.ISE.ISEAddOnTool Especifica o objeto a ser removido do Windows PowerShell ISE.

# Load a DLL with an add-on and then add it to the ISE
[reflection.assembly]::LoadFile("c:\test\ISESimpleSolution\ISESimpleSolution.dll")
$psISE.CurrentPowerShellTab.VerticalAddOnTools.Add("Solutions", [ISESimpleSolution.Solution], $true)

SetSelectedPowerShellTab( psTab )

Com suporte no Windows PowerShell ISE 3.0 e posterior, e não presente em versões anteriores.

Seleciona a guia PowerShell especificada pelo parâmetro psTab .

psTab - Microsoft.PowerShell.Host.ISE.PowerShellTab A guia PowerShell a ser selecionada.

$newTab = $psISE.PowerShellTabs.Add()
# Change the DisplayName of the new PowerShell tab.
$newTab.DisplayName = 'Brand New Tab'

Remover( psTab )

Com suporte no Windows PowerShell ISE 3.0 e posterior, e não presente em versões anteriores.

Remove a guia PowerShell especificada pelo parâmetro psTab .

psTab - Microsoft.PowerShell.Host.ISE.PowerShellTab A guia PowerShell a ser removida.

$newTab = $psISE.PowerShellTabs.Add()
Change the DisplayName of the new PowerShell tab.
$newTab.DisplayName = 'This tab will go away in 5 seconds'
sleep 5
$psISE.PowerShellTabs.Remove($newTab)

Consulte Também