PowerShellTab 컬렉션 객체는 PowerShellTab 객체들의 집합입니다. 각 PowerShellTab 객체는 별도의 런타임 환경으로 작동합니다. Microsoft.PowerShell.Host.ISE.PowerShellTabs 클래스의 인스턴스입니다. 예를 들어 객체가 있습니다 $psISE.PowerShellTabs .
메서드
Add()
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
컬렉션에 새로운 PowerShell 탭을 추가합니다. 새로 추가된 탭을 반환합니다.
$newTab = $psISE.PowerShellTabs.Add()
$newTab.DisplayName = 'Brand New Tab'
Remove(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
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)
SetSelectedPowerShellTab(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab)
Windows PowerShell ISE 2.0 이후 버전에서 지원됩니다.
psTab 매개변수로 지정된 PowerShell 탭을 선택해 현재 활성화된 PowerShell 탭으로 만듭니다.
- psTab - PowerShell 탭을 선택할 수 있습니다.
# 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