PowerShellTab 集合对象是 PowerShellTab 对象的集合。它是 Microsoft.PowerShell.Host.ISE.PowerShellTabs 类的一个实例。例如 $psISE.PowerShellTabs 对象。
方法
Add()
向集合中添加新的 PowerShell 选项卡。此方法将返回新添加的选项卡。
$psISE.PowerShellTabs.Add()
SetSelectedPowerShellTab(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)
选择 pstab 指定的 PowerShell 选项卡。
- psTab
- 要选择的 PowerShell 选项卡。
$newTab = $psISE.PowerShellTabs.Add() # Change the DisplayName of the new PowerShell tab. $newTab.DisplayName="Brand New Tab"
Remove(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)
删除 pstab 指定的选项卡。
- psTab
- 要删除的 PowerShell 选项卡。
$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)
另请参阅