1
我運行此腳本設置-AzureServiceDiagnosticsExtension:無法綁定參數「StorageContext」
$storage_name = "<storage name>"
$key = "<key>"
$config_path="C:\diagnostics.wadcfgx"
$service_name="<service name>"
$storageContext = (New-AzureStorageContext -StorageAccountName $storage_name -StorageAccountKey $key)
Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $config_path -ServiceName $service_name -Slot Staging -Role WorkerRole1
緊接着錯誤而得到了以下錯誤:
Set-AzureServiceDiagnosticsExtension : Cannot bind parameter 'StorageContext'. Cannot convert the "Microsoft.WindowsAzure.Commands.Common.Storage.AzureStorageContext" value of type
"Microsoft.WindowsAzure.Commands.Common.Storage.AzureStorageContext" to type "Microsoft.WindowsAzure.Commands.Common.Storage.AzureStorageContext".
下Azure的自動化運行手冊運行我的劇本時,我得到相同,但本地運行正常。 – Mikee