I’m trying to use the OMS cmdlets in the Azure module, but whenever I run any of them it errors and says I need to run Login-AzureRmAccount, even though I’ve already done it and it logged in successfully. I’m tearing my hair out (what’s left of it anyway!). Am I being an idiot!?
I had this same problem. It was an issue with multiple ARM modules on the same machine. You can try and find them and rip out the old ones, or do as I did, and rip them all out and start fresh. There are articles out there that will tell you the location of the old ones to rip out.