$ErrorActionPreference = 'Stop' function Assert-True { param( [bool]$Condition, [string]$Message ) if (-not $Condition) { throw $Message } } Assert-True (Test-Path '.htaccess') 'Missing .htaccess' $ht = Get-Content -Raw '.htaccess' Assert-True ($ht -match 'RewriteRule') 'Missing RewriteRule in .htaccess' 'OK'