Resetting Azure PowerShell account credentials

Posted on Sunday, November 8, 2015

Recently I was having some problems with using Add-AzureAccount in PowerShell.
I could sign in correctly but as soon as I tried any Azure cmdlet I would get the error "No default subscription has been designated".

This error kept showing up, also after Remove-AzureAccount, restarting PowerShell or PC.

After searching I found this folder (C:\Users<User Name>\AppData\Roaming\Windows Azure Powershell) where account information is cached by Azure PowerShell.
Deleting the content of that folder, and restarting PowerShell fixed the problem.

Disclaimer: Any views or opinions expressed on this blog are my own personal ones and do not represent my employer in any way.