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:\test\ISESimpleSolution\ISESimpleSolution.dll")
$psISE.CurrentPowerShellTab.VerticalAddOnTools.Add("Solutions", [ISESimpleSolution.Solution], $true)
Remove( Item )
Windows PowerShell ISE 3.0 以降でサポートされており、以前のバージョンには存在しません。
指定したアドオン ツールをコレクションから削除します。
項目 - Microsoft.PowerShell.Host.ISE.ISEAddOnTool 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 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)
関連項目
PowerShell