I am facing the problem when AzureStorageContext retrieved using New-AzureStorageContext command is incompatible with New-AzureServiceDiagnosticsExtensionConfig input parameters.
$storageContext = New-AzureStorageContext –StorageAccountName $storage_AccountName –StorageAccountKey $storage_Key
$config2 = New-AzureServiceDiagnosticsExtensionConfig -StorageContext $storageContext -DiagnosticsConfigurationPath $configuration_FilePath_EventHubListener -role $workerRole_WorkerRoleName
Error: New-AzureServiceDiagnosticsExtensionConfig : Cannot bind parameter 'StorageContext'. Cannot convert the "Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext" value of type "Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext" to type "Microsoft.WindowsAzure.Commands.Common.Storage.AzureStorageContext". At C:\Build\BuildScripts\AzurePowershell_V1.3.8-DeployeAndDiagnostics\DeployeAndDiagnosticsNewPowershell.ps1:90 char:71 + $config2 = New-AzureServiceDiagnosticsExtensionConfig -StorageContext $storageCo ... + ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-AzureServic...ExtensionConfig], ParameterBindingException + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.NewAzureServiceDiagnosticsEx tensionConfigCommand
It is working in local but not in the Virtual machine.