«

»

Feb 23

Keep tabs on your tabs: Name your PowerCLI Sessions

I’ve heard a number of people complain that they end up having too many PowerShell/PowerCLI sessions open on their machine and sometimes forget what they’d done in a specific console. When I heard the last person complain, it caused me to look down at my PowerCLI sessions. Sure enough, I had 7 consoles open…

Screenshot 2015-02-21 13.55.19

Well, it doesn’t really bother me these days. Why? you ask? there’s a pretty easy command you can run that will rename your console title which will allow you to stay at least a little more organized.

I use the following command to rename my sessions:

you can add the following line into your scripts after you connect to vCenter.

Before:

Screenshot 2015-02-21 13.54.10

After:

Screenshot 2015-02-21 13.54.14

 

simple, yet effective…

3 comments

  1. Andrew Dauncey

    I started doing this recently as well.

    I also update the title during long running scripts to let me know what section its up to, and any success/failures. Then I can mouse over the group of PowerShell windows to see the status of them all.

    1. Brian Graf

      Thats a really awesome thing to do. Do you have periodic updates determined by the section of your script it is processing?

      1. Andrew Dauncey

        yep exactly.

        I might have up to 10 PowerShell windows running, so it really helps knowing the progress without having to go through them all.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

seven + eight =