Why doesn't a code block preserve whitespace in this PowerShell script? In the editor (using 4 spaces for the code block, and more spaces to indent) this looks like:
But I am not seeing any indentation whatsoever in IE9 (and neither in IE10/Win8 CP):
And here's what you're seeing:
$site = new-object Microsoft.SharePoint.SPSite($url)
$sitelists = foreach ($web in $site.AllWebs)
{
if ($web -eq "Search")
{
Write-Host "Come in"
}
}
Frankly I've gone to using <pre></pre>
tags which can't be the right the way to do this but at least the results are readable - for now:
And again, here's what you're seeing:
$site = new-object Microsoft.SharePoint.SPSite($url) $sitelists = foreach ($web in $site.AllWebs) { if ($web -eq "Search") { Write-Host "Come in" } }