I would use `Write-Error` here so that the global `$Error` object is populated.

Also, you can use here-strings like

```powershell
Write-Error @"
You did a bad thing!
"@
```