This topic contains 5 replies, has 3 voices, and was last updated by
October 26, 2018 at 1:36 pm #119088
This is my initial code
Connect-AzureRmAccount -Subscription "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
I am then prompted for credentials and authenticate to a subscription i have "reader" permissions for.
The next command I run is
and the correct info appears (name / account / sub name), however subsequent commands such as to azure resources in that subscription do not return any values though they do return values in the azure cloudshell interface.
October 26, 2018 at 1:41 pm #119098ParticipantPoints: 112Rank: Participant
Which version of the AzureRM module are you running?
Get-Module AzureRM -ListAvailable
Make sure you get the latest https://www.powershellgallery.com/packages/AzureRM
Azure Cloud Shell runs PowerShell Core. You could try and install PowerShell Core and the Az module, which is in Preview, but will be replacing AzureRM in the future.
Get PowerShell Core (for instance with Chocolatey):
choco install pwsh
Then from PowerShell Core:
Install-Module Az Connect-AzAccount -Subscription "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
Just wondering if any of these options work for you.
October 26, 2018 at 1:42 pm #119101KeymasterPoints: 17Rank: Member
What version of the AzureRM module are you running out of curiousity on your local machine? Can you try to run the same commands on a virtual machine outside of your environment for grins? Also, can you list all of the permissions that you have for that environment? I'll set up an account with similar perms in mine and see if I can dupe the issue.
October 26, 2018 at 1:59 pm #119109
I ran Get-Module AzureRM -List available and got 2 versions available:
Note: I'm running windows 10, so using WindowsPowerShell and I have "reader" across the board on the subscription and to all resources (VM's, keyvault, etc)
October 26, 2018 at 5:07 pm #119163
Hi guys, it was a dumb error on my part. I should have been running
instead of Get-AzureKeyVaultKey.
October 26, 2018 at 7:32 pm #119224ParticipantPoints: 112Rank: Participant
Good to hear you have your issue resolved. Thanks for getting back to us!
You must be logged in to reply to this topic.