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]
0 comments