Getting error in azure devops release

Anonymous
2024-07-12T17:18:41.65+00:00

Below is the error:

Error: The term 'Update-AzVmssInstances' is not recognized as a name of a cmdlet, function, script file, or executable program throws in Azure powershell of Azure devops pipeline. How can I solve this issue

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,535 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 54,401 Reputation points
    2024-07-12T18:04:48.3866667+00:00

    We do not currently provide support for ADO on this site. Please use their official support channel to get assistance.

    0 comments No comments

  2. Yanhong Liu 10,225 Reputation points Microsoft Vendor
    2024-07-16T06:35:20.2866667+00:00

    Hello,

    Thank you for posting in Q&A forum.

    The error you encounter usually means that the "Update-AzVmssInstances" cmdlet is not available in the current Azure PowerShell session. This can happen for several reasons, such as the module not being installed or loaded. Here is a step-by-step method to resolve this issue:

    1. Ensure that the Azure PowerShell module is installed and updated:

    Make sure that the Azure PowerShell module is installed and up to date. You can install or update it using the following commands in your PowerShell session:

    Install-Module -Name az -AllowClobber -Force

    Update-Module -Name Az

    1. Import the az module:

    Import-Module Az

    1. Verify the Az.Compute module:

    The "Update-AzVmssInstances" cmdlet specifically belongs to the "Az.Compute" module. Make sure it is available and loaded:

    Import-Module Az.Compute

    1. Use the correct cmdlet name:

    Verify that the correct cmdlet name is used, as sometimes cmdlet names change between module versions. You can check by listing the available cmdlets:

    Get-Command -Module Az.Compute

    Look for "Update-AzVmssInstances"

    If you have tried the above steps and the problem persists, I recommend contacting Azure DevOps Services technical support, who may be able to provide you with more detailed assistance.

    Microsoft Azure Support Ticket | Microsoft Azure

    I hope the information above is helpful.

    Best Regards,

    Yanhong Liu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.