Clear Azure Subscription Details from PowerShell


When working with Azure + PowerShell, you would download the subscription details using Get-azurepublishsettingsFile cmdlet and work on the default subscription using PowerShell. There are scenarios where you might need to re-populate subscription details, either because of your subscription changes or try to refresh for the changes.

Initial Connection to Azure using PowerShell:

When you initially download the Azure Subscription details using PowerShell, there are 2 locations the information gets stored

a) The website will prompt for the file to download (eg: The <your subscription>-<date>-<Credentials>.Publishsettings), and to be saved in your persistent storage.

b) The .Json file which will be stored under  “C:\Users\Administrator\AppData\Roaming\Windows Azure Powershell” folder and the file corresponding to subscription will be AzureProfile.Json.


Make Changes or Re-load the Azure subscription data:

In order to re-load the file, please delete the following files which are listed under section “Initial Connection to Azure using PowerShell” and re-run the cmdlet Get-AzurepublishsettingsFile cmdlet