New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A context retrieved using New-AzureStorageContext command is incompatible with Start-AzureVirtualNetworkGatewayDiagnostics and Start-AzureVNetGatewayDiagnostics #3976

Closed
thatsmybirthday opened this Issue May 15, 2017 · 3 comments

Comments

Projects
None yet
5 participants
@thatsmybirthday

thatsmybirthday commented May 15, 2017

Cmdlet(s)

New-AzureStorageContext
Start-AzureVirtualNetworkGatewayDiagnostics
Start-AzureVNetGatewayDiagnostics

PowerShell Version

5.1.14393.576

Module Version

Azure 4.0.1 (Azure.Storage 3.0.1)

OS Version

Windows 10, Windows Server 2016

Description

I faced the problem when AzureStorageContext retrieved using New-AzureStorageContext command is incompatible with Start-AzureVirtualNetworkGatewayDiagnostics and Start-AzureVNetGatewayDiagnostics input parameters.
Error:

Start-AzureVirtualNetworkGatewayDiagnostics : 
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".

it means you use the latest (May 15 2017) version of Azure powershell module: 4.0.1
This version has some incompatibility with latest Azure.Storage 3.0.1.

You need to remove it and install Azure 3.8.0 (April 5th 2017) it has Azure.Storage 2.8.0 as dependency. https://www.powershellgallery.com/packages/Azure/3.8.0

Uninstall-Module -Name Azure.Storage
Uninstall-Module -Name Azure
Install-Module -Name Azure -RequiredVersion 3.8.0

This combination works fine.

@thatsmybirthday thatsmybirthday changed the title from AzureStorageContext retrieved using New-AzureStorageContext command is incompatible with Start-AzureVirtualNetworkGatewayDiagnostics and Start-AzureVNetGatewayDiagnostics input parameters to A context retrieved using New-AzureStorageContext command is incompatible with Start-AzureVirtualNetworkGatewayDiagnostics and Start-AzureVNetGatewayDiagnostics May 15, 2017

@DdenBraver

This comment has been minimized.

Show comment
Hide comment
@DdenBraver

DdenBraver May 16, 2017

This issue is linked to #3979 .
Seems this is due to the type change from: Microsoft.WindowsAzure.Commands.Common.Storage.AzureStorageContext to Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext

DdenBraver commented May 16, 2017

This issue is linked to #3979 .
Seems this is due to the type change from: Microsoft.WindowsAzure.Commands.Common.Storage.AzureStorageContext to Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext

@markcowl

This comment has been minimized.

Show comment
Hide comment
@markcowl

markcowl May 17, 2017

Member

All such parameters should have been changed to the common interface type IStorageContext, so that they are independent of the storage account version.

Member

markcowl commented May 17, 2017

All such parameters should have been changed to the common interface type IStorageContext, so that they are independent of the storage account version.

@markcowl markcowl added this to the June 2017 milestone May 17, 2017

@cormacpayne cormacpayne modified the milestones: July 2017, June 2017 Jun 12, 2017

@markcowl markcowl assigned cormacpayne and unassigned shahabhijeet Jun 13, 2017

@markcowl markcowl modified the milestones: July 2017, August 2017 Jul 11, 2017

@markcowl

This comment has been minimized.

Show comment
Hide comment
@markcowl

markcowl Aug 8, 2017

Member

This should be fixed in the release going out on Wednesday 8/9

Member

markcowl commented Aug 8, 2017

This should be fixed in the release going out on Wednesday 8/9

@markcowl markcowl closed this Aug 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment