Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

PowerTip: PowerShell Tabs

$
0
0

Summary: Understand Windows PowerShell tabs.

Hey, Scripting Guy! Question How can I use Windows PowerShell to efficiently add 1, 2, or 3 tabs to a string?

Hey, Scripting Guy! Answer Use the `t character for a single tab. Use `t`t for two tabs, and multiply them for three or more (such as “`t”*3).
           Here are examples:

PS C:\> "this has a `t in it"

this has a       in it

PS C:\> "this has 2 `t`t in it"

this has 2               in it

PS C:\> "this has 3" + "`t"*3 + "in it"

this has 3                      in it


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>