> ## Content Index
> Fetch the complete content index at: https://codeisahighway.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# PowerShell Azure cmdlets: A parameter cannot be found that matches parameter name 'SubscriptionDataFile'
- URL: https://codeisahighway.com/powershell-azure-cmdlet-a-parameter-cannot-be-found-that-matches-parameter-name-subscriptiondatafile/
- Published: 2015-01-09T23:23:00.000Z
- Updated: 2026-08-10T07:12:22.000Z
- Author: Stephane Lapointe
- Tags: PowerShell, DevOps, Microsoft Azure, #Import 2023-07-11 16:44, #Import 2026-09-04 10:31, #Import 2026-09-04 13:56

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:

```
C:\Temp\PrepareEnvironment.ps1
: 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](https://github.com/Azure/azure-powershell/releases/tag/v0.8.12-December2014?ref=codeisahighway.com) 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.