ISEAddOnToolCollection 对象是一组 ISEAddOnTool 对象。 一个例子是物体。$psISE.CurrentPowerShellTab.VerticalAddOnTools
Methods
Add( Name, ControlType, [IsVisible] )
Windows PowerShell ISE 3.0及以后版本支持,早期版本中不支持。
为收藏添加了一个新的附加工具。 它会返回新添加的附加工具。 在执行该命令之前,你必须在本地电脑上安装附加工具并加载装配文件。
- Name - String - 指定添加到 Windows PowerShell ISE 的插件显示名称。
- ControlType - 类型 - 指定新增的控制项。
-
[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及以后版本支持,早期版本中不支持。
移除集合中指定的附加工具。
- Item - 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 -The PowerShell tab to select.
$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)