Oggetto PowerShellTabCollection
L'oggetto della raccolta PowerShellTab è una raccolta di oggetti PowerShellTab. Ogni oggetto PowerShellTab funziona come un ambiente di runtime separato. È 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.I edizione Standard. PowerShellTab psTab)
Supportato in Windows PowerShell ISE 2.0 e versioni successive.
Rimuove la scheda specificata dal parametro psTab.
psTab Scheda di 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.I edizione Standard. PowerShellTab psTab)
Supportato in Windows PowerShell ISE 2.0 e versioni successive.
Seleziona la scheda di PowerShell specificata dal parametro psTab in modo che diventi la scheda di PowerShell attualmente attiva.
psTab Scheda di 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
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per