I'm building a extension for VSTS that uses the AzureRM module. On every load we see that the 2.1.0 version gets loaded in a release pipeline in a Hosted agent. To load the AzureRM module we use the module: VstsAzureHelpers_
In that version there seem to be a bug, on some operation we receive the following exception: Exception of type 'Microsoft.Rest.Azure.CloudException' was thrown. on for example this operation: New-AzureRmRoleAssignment
With latest VstsAzureHelpers , it adds azurePsVersion
parameter that used to specify the module version, such as 5.1.1.
Snip code:
function Initialize-Azure {
[CmdletBinding()]
param( [string] $azurePsVersion )
function Import-AzureModule {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[ValidateSet('Azure', 'AzureRM')]
[string[]] $PreferredModule,
[string] $azurePsVersion)
I recommend that you can refer to AzurePowerShell task (2.*) to update your extension code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.