SharePoint - Powershell replacement for the old STSadm RepairContentDatabase

Powershell replacements are extremely useful.

Test-SPContentDatabase gives you much of interest.

However the key item you were looking for is the .REPAIR method.

Get-SPContentDatabase | ForEach-Object { $_.Repair($true)}

or use $false to just report and not repair.
This is the same function as the STSADM cmdlet, but better because it pipelines all the ContentDB's.