Oggetto PowerShellTabCollection
L'insieme powerShellTab è un insieme di oggetti di PowerShellTab. Ogni PowerShellTab oggetti funge da ambiente di runtime separato. Si tratta di un'istanza della classe Microsoft.PowerShell.Host.ISE.PowerShellTabs. Un esempio è l'oggetto $psISE.PowerShellTabs
.
Metodi
Add()
Supportato in Windows PowerShell ISE 2.0 e versioni successive.
Aggiunge una nuova scheda di PowerShell alla raccolta. Restituisce la scheda appena aggiunta.
$newTab = $psISE.PowerShellTabs.Add()
$newTab.DisplayName = 'Brand New Tab'
Remove(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)
Supportato in Windows PowerShell ISE 2.0 e versioni successive.
Rimuove la scheda specificata dal parametro psTab.
psTab 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)
SetSelectedPowerShellTab(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)
Supportato in Windows PowerShell ISE 2.0 e versioni successive.
Seleziona la scheda PowerShell specificata dal parametro psTab per renderla la scheda PowerShell attualmente attiva.
psTab scheda PowerShell da selezionare.
# Save the current tab in a variable and rename it
$oldTab = $psISE.CurrentPowerShellTab
$psISE.CurrentPowerShellTab.DisplayName = 'Old Tab'
# Create a new tab and give it a new display name
$newTab = $psISE.PowerShellTabs.Add()
$newTab.DisplayName = 'Brand New Tab'
# Switch back to the original tab
$psISE.PowerShellTabs.SelectedPowerShellTab = $oldTab