PowerShellTabCollection 개체The PowerShellTabCollection Object

PowerShellTab 컬렉션 개체는 PowerShellTab 개체의 컬렉션입니다.The PowerShellTab collection object is a collection of PowerShellTab objects. PowerShellTab 개체는 별도의 런타임 환경으로 작동합니다.Each PowerShellTab object functions as a separate runtime environment. Microsoft.PowerShell.Host.ISE.PowerShellTabs 클래스의 인스턴스입니다.It is an instance of Microsoft.PowerShell.Host.ISE.PowerShellTabs class. 예제는 $psISE.PowerShellTabs 개체입니다.An example is the $psISE.PowerShellTabs object.

메서드Methods

추가()Add()

Windows PowerShell ISE 2.0 이상에서 지원됩니다.Supported in Windows PowerShell ISE 2.0 and later.

새 PowerShell 탭을 컬렉션에 추가합니다.Adds a new PowerShell tab to the collection. 새로 추가된 탭을 반환합니다.It returns the newly added tab.

$newTab = $psISE.PowerShellTabs.Add()
$newTab.DisplayName = 'Brand New Tab'

Remove(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)Remove(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)

Windows PowerShell ISE 2.0 이상에서 지원됩니다.Supported in Windows PowerShell ISE 2.0 and later.

psTab 매개 변수로 지정되는 탭을 제거합니다.Removes the tab that is specified by the psTab parameter.

psTab 제거할 PowerShell 탭입니다.psTab The PowerShell tab to remove.

$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)SetSelectedPowerShellTab(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)

Windows PowerShell ISE 2.0 이상에서 지원됩니다.Supported in Windows PowerShell ISE 2.0 and later.

psTab 매개 변수에서 지정하는 PowerShell 탭을 선택하여 현재 사용 중인 PowerShell 탭으로 만듭니다.Selects the PowerShell tab that is specified by the psTab parameter to make it the currently active PowerShell tab.

psTab 선택할 PowerShell 탭입니다.psTab The PowerShell tab to select.

# 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

참고 항목See Also