Can't see or import any Azure module!

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Matt McNabb Matt McNabb 1 year, 8 months ago.

  • Author
    Posts
  • #23382
    Profile photo of Colbert Philippe
    Colbert Philippe
    Participant

    I am running Windows 7 Pro. I successfully installed PowerShell 4.0. I want to start experimenting with Azure commandlets. However, I can see nor import any of the Azure modules even when I run > Get-Module -LisstAvailable , which should display all modules available to me. How can I view the Azure modules?

    Here is may screen capture.

  • #23385
    Profile photo of Don Jones
    Don Jones
    Keymaster

    The modules don't come with Windows. Did you download and install them?

  • #23395
    Profile photo of Matt McNabb
    Matt McNabb
    Participant

    Here is the link for installing the Azure module:
    http://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/

    Also, if you have already installed this, it won't automatically be added to your module path. For me the installer dropped it at "${env:ProgramFiles(x86)}\Microsoft SDKs\Azure\powershell\ServiceManagement\Azure\Azure.psd1". You'll either need to specify the full path to the module manifest file or add it to your path. I chose the second option and add it to my module path in my Powershell profile:

    switch ($Env:PROCESSOR_ARCHITECTURE)
    {
        'x86'   {$AzureModulePath = "$env:ProgramFiles\Microsoft SDKs\Azure\powershell\ServiceManagement\Azure\Azure.psd1"}
        'AMD64' {$AzureModulePath = "${env:ProgramFiles(x86)}\Microsoft SDKs\Azure\powershell\ServiceManagement\Azure\Azure.psd1"} 
    }
    $Env:PSModulePath += ";$AzureModulePath"
    

    Then you can just run:

    Import-Module Azure

You must be logged in to reply to this topic.