Renaming Tabs in the ISE

Renaming Tabs in the ISE

  • Comments 2

When you have multiple PowerShell tabs open in the ISE, it may be handy to rename them, so you can tell which is which.  This is especially useful when using Remoting with Enter-PSSession.  The problem when using Enter-PSSession is that you have no access to the root ISE object ($psise) when remoting, so you should use another (local) tab and enter the following:

   $psise.PowerShellTabs[0].DisplayName = 'myRemoteMachine'

Needless to say, if you want to rename the second tab, you'd use PowerShellTabs[1] ... and so on

To rename the current PowerShell tab, enter:

   $psise.CurrentPowerShellTab.DisplayName = 'PowerShellRocks'

ref@

Refaat Issa [MSFT]

Leave a Comment
  • Please add 4 and 3 and type the answer here:
  • Post
  • You can add a new tab with $psISE.PowerShellTabs.Add(). Is there any way to open a tab with admin rights?

  • @Eric,

    You've probably already sorted this but anyone else needing an alternate context can open ISE with the "runas" command and change the user context that way. Works like a charm in the domain environment.

Page 1 of 1 (2 items)