I'm trying to update the diagnostics configuration for an Azure Cloud Service with the following command...
$storage = New-AzureStorageContext -StorageAccountName {storageName} -StorageAccountKey {storage key}
Set-AzureServiceDiagnosticsExtension -ServiceName MyCloudServiceName -StorageContext $storage -Role {my role name} -Slot Production -DiagnosticsConfigurationPath MyWorkerRoleContent\diagnosticsUAT.wadcfgx
Which fails with the following error...
Set-AzureServiceDiagnosticsExtension : Deployment not found in service: MyCloudServiceName and slot: Production. At line:1 char:1 + Set-AzureServiceDiagnosticsExtension -ServiceName MyCloudServiceName ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Set-AzureServiceDiagnosticsExtension], Exception + FullyQualifiedErrorId : System.Exception,Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureSe rviceDiagnosticsExtensionCommand
I've actually had success with the exact same commands but on another azure subscription (and obviously different cloud service names and keys). I've tried creating a staging slot and using the command on the staging slot. I've also tried omitting the slot altogether, all with the same result.
Has anyone encountered this issue and have any insight on how to rectify it?