upgrade all content database sharepoint 2013 powershell

C++
Get-SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase

Source

Also in C++: