Azure Azure Operational Insights OMS PowerShell

OMS – Error “Run Login-AzureRMAccount to Login” e.g. OMS Cmdlets

error-red-key-595x335

I wanted to play with the OMS cmdlets which are part of the AzureRM modules. The OMS / OperationsInsights module itself is called AzureRM.OperationsalInsights. A good place to start with OMS native PowerShell cmdlets is a blog post on the Building Clouds blog. So what is the exact issue? Well, I tried to query my workspace for installed solutions. First I logged in using the Login-AzureRmAccount  cmdlet which succeeded quite nicely..

image

…after I authenticated I ran a cmdlet to get the solutions from OMS…

image

..no matter which cmdlet I tried, I always received the error above.

After some time, I tried to update the modules, running Update-Module which ended in this error…

image

Next step, I tried to install the entire ARM modules by running Install-Module AzureRM –AllowClobber, which ended in a similar error…

image

…so I decided to go for the sledge hammer and I deleted all the modules in my Modules directory…

image

Next I ran Install-Module AzureRM –AllowClobber again, which succeeded…

image

So I tried again to login to Azure and run Get-AzureRmOperationalInsightsIntelligencePacks, which finally succeeded :)…

image

I hope this helps and saves you some headaches…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.