You should update your lines of code with following
$BdcServiceAppProxy = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq "Business Data Connectivity Service Application Proxy" -AND $_.DisplayName -eq "Business Data Connectivity Service Application" }
If you run your command you will get back all proxy groups based on the TypeName "Business Data Connectivity Service Application Proxy". If you use more than one BCS service application you want be happy.
Within SharePoint 2010 / 2013 you know that the proxy group name is the same as the service application what you created before.
Timo
$BdcServiceAppProxy = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq "Business Data Connectivity Service Application Proxy" -AND $_.DisplayName -eq "Business Data Connectivity Service Application" }
If you run your command you will get back all proxy groups based on the TypeName "Business Data Connectivity Service Application Proxy". If you use more than one BCS service application you want be happy.
Within SharePoint 2010 / 2013 you know that the proxy group name is the same as the service application what you created before.
Timo