I am then prompted for credentials and authenticate to a subscription i have “reader” permissions for.
The next command I run is
Get-AzureRmContext
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.
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):
[pre]choco install pwsh[/pre]
Then from PowerShell Core:
[pre]Install-Module Az
Connect-AzAccount -Subscription “xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx”[/pre]
Just wondering if any of these options work for you.
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.
I ran Get-Module AzureRM -List available and got 2 versions available:
6.7.0
5.1.1
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)