PowerTip: Using Tabs in PowerShell

PowerTip: Using Tabs in PowerShell

  • Comments 3
  • Likes

Summary: Learn about creating tabs in Windows PowerShell by using the `t.

Question: How would I use the `t in a script to produce a tab?

Answer: "`thi"

Question: That syntax above is ugly. What happens if I put a space in it like this: “`t hi”?

Answer: If you include a space in the line like “`t hi”, then you will tab over one tab stop and one additional space.

Question: Is the `t command such as “`thi” case sensitive?

Answer: Yes. It is one of the few things that are case sensitive in Windows PowerShell. If you use the `t as follows, you produce Thi on the line: “`Thi”.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • I was looking through some of your blog posts on this site and I believe this web site is really informative! Keep on putting up.This site is really helpful for us.

    http://janinepatterson.com/

  • Thanks for another informative site. Where else could I get that type of information written in such an ideal way

    http://joshuabadillo.com/

  • Hi Ed,

    interestinglky enough, I didn't realize up to now, that the `t tab character is case sensitive!

    If somebody would have asked me that question, I wouldn't have had the right answer at hand.

    Maybe because I always used the lowercase version for whatever reason ...

    Klaus.