After updating my Powershell with the November 2014 updates, the Import-PublishedSettingsFile commandlet is creating a subscription file in JSON format instead of XML.
How do I get a file in XML format? There are not output format options.
BACKGROUND The change appears to be causing an invalid account error when I attempt to run commandlets that rely on the current subscription. One example is Get-AzureService which returns this error:
Get-AzureService : Account with name '68BC909D63F2A51F987005620552FB1D643E03DE' does not exist. Parameter name: accountName At C:\UtilityScripts\Modules\AzureVdcConfigFileGenerate\AzureVdcConfigFileGenerate.psm1:189 char:42 + [object] $script:aSourceVdcService = Get-AzureService -ServiceName $sSourceV ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-AzureService], ArgumentException + FullyQualifiedErrorId : System.ArgumentException,Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices.GetAzureServiceCommand
I set up the subscriptions as follows:
Set-AzureSubscription -SubscriptionName $sSourceSubscriptionName -SubscriptionDataFile $sSourceSubscriptionFileName -CurrentStorageAccountName $sSourceStorageAccountName
Select-AzureSubscription -SubscriptionDataFile $sSourceSubscriptionFileName -NoDefault
Select-AzureSubscription -SubscriptionDataFile $sSourceSubscriptionFileName -NoCurrent
Select-AzureSubscription -SubscriptionName $sSourceSubscriptionName -current -SubscriptionDataFile $sSourceSubscriptionFileName
The result is
SubscriptionId : b6f458b3-0228-48f4-8dec-b7a4884258c6
SubscriptionName : NameOfSubscription
Environment : AzureCloud
SupportedModes : AzureServiceManagement
DefaultAccount : 68BC909D63F2A51F987005620552FB1D643E03DE
Accounts : {68BC909D63F2A51F987005620552FB1D643E03DE}
IsDefault : False
IsCurrent : True
CurrentStorageAccountName : NameOfStorageAccount
I think the JSON format is causing the issue.