你好我试图使Web角色的诊断,从而使Web角色诊断,但是当运行脚本,我得到了以下错误 https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-dotnet-diagnostics无法使用PowerShell
$storage_name = "testdeploy"
$key = "keyvalue"
$config_path="E:\Tempvs\AzureCloudService3\AzureCloudService3\bin\Release\app.publish\Extensions\PaaSDiagnostics.MvcWebRole1.PubConfig.xml"
$service_name="testmyjsdiag"
$storageContext = New-AzureStorageContext -StorageAccountName $storage_name -StorageAccountKey $key
Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $config_path -ServiceName $service_name -Slot Production -Role MvcWebRole1
集-AzureServiceDiagnosticsExtension:不能绑定参数 'StorageContext'。不能 型“Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext”的 “Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext”值转换为 型 “Microsoft.WindowsAzure.Commands.Common.Storage.AzureStorageContext”。 在E:\ TK_Backup \ Drive \ PowerShell脚本\启用Web角色 Diagnostics.ps1:6 char:54 + ... reServiceDiagnosticsExtension -StorageContext $ storageContext -Diagno ... + ~~~~~~~~~ ~~~~~~ + CategoryInfo:InvalidArgument:(:) [设置AzureServiceDiagnosticsExtension],ParameterBindingException + FullyQualifiedErrorId:CannotConvertArgumentNoMessage,Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureServiceDiagnosticsExtensionCommand