다음을 통해 공유


ISEAddOnToolCollection 객체

ISEAddOnToolCollection 객체는 ISEAddOnTool 객체들의 집합입니다. 예를 들어 객체가 있습니다 $psISE.CurrentPowerShellTab.VerticalAddOnTools .

메서드

Add( Name, ControlType, [IsVisible] )

Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.

컬렉션에 새로운 추가 도구를 추가합니다. 새로 추가된 추가 도구를 반환합니다. 이 명령을 실행하기 전에 로컬 컴퓨터에 애드온 도구를 설치하고 어셈블리를 불러와야 합니다.

  • 이름 - 문자열 - Windows PowerShell ISE에 추가되는 애드온 도구의 표시 이름을 지정합니다.
  • ControlType - Type - 추가되는 컨트롤을 지정합니다.
  • [IsVisible] - 선택적 불리언 - 로 $true설정하면 애드온 도구가 관련 도구 창에서 즉시 보입니다.
# Load a DLL with an add-on and then add it to the ISE
[Reflection.Assembly]::LoadFile("C:testISESimpleSolutionISESimpleSolution.dll")
$psISE.CurrentPowerShellTab.VerticalAddOnTools.Add("Solutions", [ISESimpleSolution.Solution], $true)

Remove(Item)

Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.

지정된 애드온 도구를 컬렉션에서 제거합니다.

  • 항목 - Microsoft.PowerShell.Host.ISE.ISEddOnTool - Windows PowerShell ISE에서 제거할 객체를 지정합니다.
# Load a DLL with an add-on and then add it to the ISE
[Reflection.Assembly]::LoadFile("C:\test\ISESimpleSolution\ISESimpleSolution.dll")
$psISE.CurrentPowerShellTab.VerticalAddOnTools.Add("Solutions", [ISESimpleSolution.Solution], $true)

SetSelectedPowerShellTab(psTab)

Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.

psTab 매개변수가 지정한 PowerShell 탭을 선택합니다.

  • psTab - Microsoft.PowerShell.Host.ISE.PowerShellTab -The PowerShell 탭을 선택하여 선택합니다.
$newTab = $psISE.PowerShellTabs.Add()
# Change the DisplayName of the new PowerShell tab.
$newTab.DisplayName = 'Brand New Tab'

Remove(psTab)

Windows PowerShell ISE 3.0 이후 버전에서 지원되며, 이전 버전에는 포함되지 않습니다.

psTab 매개변수가 지정한 PowerShell 탭을 제거합니다.

  • psTab - Microsoft.PowerShell.Host.ISE.PowerShellTab - 제거할 수 있는 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)

또한 참조하십시오