new-item
): pipe to out-null
svn log 2> $null
-ea 0
): $ErrorActionPreference = "silentlycontinue"
if (!$?)
copy-item
throws an UnauthorizedAccessException
: use parameter -force
$m = [regex]::matches("test", "([a-z]+)"); if ($m[0].Success) { $str = $m[0].Groups[1].ToString(); }
$scriptName = $MyInvocation.MyCommand.Name; $scriptPath = split-path $MyInvocation.MyCommand.Path;