I'm assuming you are storing the connection strings in the ConfigurationSettings sections. Below is a sample of PowerShell that will pull in the file and for each role pull out the specific settings named in the switch statement. You may not need the switch statement if you have a single connection string you are pulling. There is also likely a nicer way to handle the setting itself, but this does give you an example of pulling specific settings manually from the cscfg file.
$deploymentCloudConfigPath = "somePathToTheFile\ServiceConfiguration.Cloud.cscfg"
# Update the cscfg file to include the correct settings.
[Xml]$cscfgXml = Get-Content $deploymentCloudConfigPath
Foreach ($role in $cscfgXml.ServiceConfiguration.Role)
{
Foreach ($setting in $role.ConfigurationSettings.Setting)
{
Switch ($setting.name)
{
"CustomSettingsName.StorageAccount" {$connString = $setting.value} #Storage
"Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" {$connString = $setting.value} #Diagnostics
}
#Here you can do whatever with the value.
$connString
}
}