In the if Statement, $reportDataSourceName is being compared to the DataSource names. This won't work if the reports DataSource name is different than the shared DataSource's name. (Example, If is looking for PRODSQL, but only PRODSQLSRC exists. It will never be found.)
$reportDataSourceName = $_.Name should be changed to $reportDataSourceName = $_.DataSourceReference.
Additional minor point, I'm not sure if it would be needed, but you may need to strip any path to the reference. (If it exists.)
There appears to be some issues when updating Shared Datasources in the Reports:
In the if Statement, $reportDataSourceName is being compared to the DataSource names. This won't work if the reports DataSource name is different than the shared DataSource's name. (Example, If is looking for PRODSQL, but only PRODSQLSRC exists. It will never be found.)
$reportDataSourceName = $_.Name
should be changed to$reportDataSourceName = $_.DataSourceReference
.Additional minor point, I'm not sure if it would be needed, but you may need to strip any path to the reference. (If it exists.)