I recently encoutered an error with some of my PowerShell scripts, in some of them, I was using the -SubscriptionDataFile parameter with the following commands:

Get-AzureSubscription -SubscriptionName MySubscriptionName -SubscriptionDataFile C:\temp\subfile.xml
Remove-AzureSubscription -SubscriptionName MySubscriptionName -SubscriptionDataFile C:\temp\subfile.xml
Select-AzureSubscription -SubscriptionName MySubscriptionName -SubscriptionDataFile C:\temp\subfile.xml
Set-AzureSubscription -SubscriptionName MySubscriptionName -SubscriptionDataFile C:\temp\subfile.xml

I upgraded my PowerShell Azure cmdlets and I got this error message:

: A parameter cannot be found that matches parameter name 'SubscriptionDataFile'.
At line:1 char:1
+ .\PrepareEnvironment.ps1 @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [PrepareEnvironment.ps1], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,PrepareEnvironment.ps1

I was using this parameter to prevent the subscription data to be written to the user's default subscription file and keep things clean, leave no trace and to avoid concurency issues if a lot of "agents/users" where adding/removing data from the same subscription file.

SubscriptionDataFile parameter is now deprecated

Version 0.8.12 deprecated the SubscriptionDataFile parameter, we are now forced to write to the default subscription file in the user's profile.

There is no workaround that I know of, the fix is not really complicated, just remove the parameter from your PowerShell calls and it will continue to work as expected, but, every calls will use in the same subscription file.