Get-AzureWebsite : Requested value 'Dynamic' was not found

后端 未结 3 1912
深忆病人
深忆病人 2021-01-16 20:02

We have a set of custom powershell modules which use the Azure powershell cmdlets - they have been working fine for over a year. I just set up a new machine and whenever I t

相关标签:
3条回答
  • 2021-01-16 20:44

    It may be fixed by updating the version of Azure PowerShell . More detail please refer to the issue and feedback. Please refer to how to install and configure Azure PowerShell. I didn't reproduce it on the Azure PowerShell v2.1.0. It works successfully.Please try to use the following code to get the current Azure PowerShell version .

    (Get-Module -ListAvailable | Where-Object{ $_.Name -eq 'Azure' }) `
    | Select Version, Name, Author, PowerShellVersion  | Format-List;
    

    0 讨论(0)
  • 2021-01-16 20:54

    Okay so this is versions of Azure and AzureRM cmdlets. Working install is

    Install-Module -Name AzureRM -RequiredVersion 1.3.2

    Install-Module Azure -AllowClobber

    Not sure about -AllowClobber but this was printed in the Azure Console....

    PackageManagement\Install-Package : A command with name 'Get-AzureStorageContainerAcl' is already available on this system. This module 'Azure' may override the existing commands. If you still want to install this module 'Azure', use -AllowClobber parameter. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1661 char:21

    Guess there is a class in the Storage namespace or something

    0 讨论(0)
  • 2021-01-16 20:57

    I installed the latest azure powershell and then ran again the script. It worked fine.

    Just to add you need to restart your machine after installing latest powershell, else you might face error "the required module Azure.Storage is not loaded"

    0 讨论(0)
提交回复
热议问题