Get-AzureVM: Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials
Azure is a pretty sweet cloud environment, with a powerful management portal to help you drive ops. But the management portal isn't enough when it comes to quickly scaling up operations. PowerShell is available from a DevOps perspective to script a large variety of tasks. Sometimes though, you get some strange errors out of PowerShell cmdlets.
I was running the Get-AzureVM cmdlet and got the error - "Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials" . Which was frustrating to me, as I was sure the Azure account I had selected using Select-AzureSubscription in my account was valid. I had setup several websites and a storage account in it earlier in the year.
Resolution - Login to the Azure portal and check your account status. Mine was still in the "welcome wizard" even though I already had a few websites running in it. Walking through the wizard cleared up the message and now the scripts run successfully.
Here's to the SEO god, may this post help some other person not spend an hour wrestling out of an awkward situation.
Additional keywords: Select-AzureSubscription Get-AzureVM FullyQualifiedErrorId Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzureVMCommand