PowerShell Scripts, Tips, Expert Advice & Training, Forums, and Resources

Welcome to PowerShell.com, the educational and community site for Windows PowerShell People. Get a quick overview.

As a Powershell.com member you will have access to:

  • Daily PowerShell tips written by Microsoft MVPs and other leading Windows PowerShell experts
  • Free Windows PowerShell advice and training provided by Microsoft MVPs and other leading Windows PowerShell experts
  • Access to leading Windows PowerShell blogs
  • A free ebook, Mastering PowerShell, written by Microsoft MVP Dr. Tobias Weltner
PowerTip of the Day

Converting TABs to Spaces

When you want to publish PowerShell code, you may want to make sure that all TAB characters are converted to one or more spaces to save space.

Here's the code that turns TAB characters to spaces:

PS> $text = "This is a`tTAB-delimited`tText"
PS> $text
This is a       TAB-delimited   Text
PS> $text -replace '\t', '  '
This is a  TAB-delimited  Text

Twitter This Tip! ReTweet this Tip!

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.