Here you can information and useful links about PowerShell !
Blogs:
Richard Siddaway's Blog http://msmvps.com/blogs/richardsiddaway/default.aspx
Hey, Scripting Guy! Blog http://blogs.technet.com/b/heyscriptingguy/
Books:
Powershell Deep Dive: http://manning.com/hicks/
Various Sources:
Scripting Games 2011 - Submitted Scripts: http://2011sg.poshcode.org/
MS TechNet Script Center - Script Repository: http://gallery.technet.microsoft.com/scriptcenter
In PS you can use RegularExpressions (RegEx) - here are a view releated Scripts and Links:
Expanding Tabs to Spaces in PowerShell http://windowsitpro.com/powershell/expanding-tabs-spaces-powershell
01.
function Expand-Tab {
02.
param([UInt32] $TabWidth = 8)
03.
process {
04.
$line = $_
05.
while
( $TRUE ) {
06.
$i = $line.IndexOf([Char] 9)
07.
if
( $i -eq -1 ) {
break
}
08.
if
( $TabWidth -gt 0 ) {
09.
$pad =
" "
* ($TabWidth - ($i % $TabWidth))
10.
}
else
{
11.
$pad =
""
12.
}
13.
$line = $line -replace
"^([^\t]{$i})\t(.*)$"
,
"`$1$pad`$2"
14.
}
15.
$line
16.
}
17.
}
18.
19.
20.
Get-Content D:\testtab.vbs | Expand-Tab 7 | Out-File d:\outtab.vbs
This is the most important line which uses "regex Syntax" and replaces the tab's with spaces
$line = $line -replace "^([^\t]{$i})\t(.*)$", "`$1$pad`$2"
Powershell Working With Regular Expressions:
http://social.technet.microsoft.com/wiki/contents/articles/4310.powershell-working-with-regular-expressions-regex.aspx
Here you find the cheat sheet (=Syntax) of regular expressions: Download
Show Help about Advanced PowerShell Parameters:
run the following command: PS:\help about_functions_advanced_parameters -ShowWindow
Managing Active Directory with Powershell:
With "Windows Server 2008 R2" MS introduced it's AD PowerShell Module, which you can load with the following command: Import-Module ActiveDirectory
This great article describes different possibilities you have with this module: http://windowsitpro.com/powershell/active-directory-powershell
AD - Powershell Blog: http://blogs.msdn.com/b/adpowershell/