Condividi tramite


Oggetto ISEAddOnToolCollection

L'oggetto ISEAddOnToolCollection è un insieme di oggetti ISEAddOnTool. Un esempio è l'oggetto $psISE.CurrentPowerShellTab.VerticalAddOnTools.

Metodi

Add( Name, ControlType, [IsVisible] )

Supportato in Windows PowerShell ISE 3.0 e versioni successive e non presente nelle versioni precedenti.

Aggiunge un nuovo strumento aggiuntivo alla raccolta. Restituisce lo strumento aggiuntivo appena aggiunto. Prima di eseguire questo comando, è necessario installare lo strumento aggiuntivo nel computer locale e caricare l'assembly.

Nome - Stringa specifica il nome visualizzato dello strumento aggiuntivo aggiunto a Windows PowerShell ISE.

ControlType -Type Specifica il controllo aggiunto.

[IsVisible] : valore booleano facoltativo Se impostato su $true, lo strumento aggiuntivo è immediatamente visibile nel riquadro degli strumenti associato.

# 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)

Remove( Item )

Supportato in Windows PowerShell ISE 3.0 e versioni successive e non presente nelle versioni precedenti.

Rimuove lo strumento aggiuntivo specificato dalla raccolta.

Item - Microsoft.PowerShell.Host.ISE.ISEAddOnTool Specifica l'oggetto da rimuovere da 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 )

Supportato in Windows PowerShell ISE 3.0 e versioni successive e non presente nelle versioni precedenti.

Seleziona la scheda PowerShell specificata dal parametro psTab.

psTab - Microsoft.PowerShell.Host.ISE.PowerShellTab Scheda PowerShell da selezionare.

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

Remove( psTab )

Supportato in Windows PowerShell ISE 3.0 e versioni successive e non presente nelle versioni precedenti.

Rimuove la scheda di PowerShell specificata dal parametro psTab.

psTab - Microsoft.PowerShell.Host.ISE.PowerShellTab Scheda PowerShell da rimuovere.

$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)

Vedere anche