0

I'm trying to create a storage account but I get the following error:

"New-AzStorageAccount : The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2018-11-01'. The supported api-versions are '2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016- 12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'."

As you can tell I'm using Az Modules. Is there something additional I need to install for the checknameavailability feature to work? Here is my powershell version info: $PSVersionTable.PSVersion

Major Minor Build Revision


5 1 17134 590

I've tried using the same command with AzureRm.. but same error. I don't have a much Powershell experience so I'm lost on how to fix this. I'd appreciate any help/guidance on resolving this issue.

1

Checked the Azure Rest API call and powershell for checkNameAvailability it's working fine.

RestAPI

PowerShell

You need to check on the azure module version not the PowerShell version, i will check specifically the Storage Module in the Azure Module.

Storage Module

  • I'm using the Az modules, but when I try running it i get the same api issue. My api version '2018-11-01' but The supported api-versions are '2018-07-01,2018-03-01-preview,2018-02-01,201 7-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'. Is it possible to downgrade my api version or something? – jrd1989 Apr 12 at 17:37
  • You can check the module version on AZ module too i.imgur.com/nFjFcSz.png. If you are on the latest and still getting issue try running the Get-AzStorageAccountNameAvailability command with -verbose. Get-AzStorageAccountNameAvailability -Name serverfaultstr336 -Verbose – Hannel Apr 13 at 2:35
0

Also make sure you don’t have the “old” AzureRM module installed when you are using AZ module. I’ve had similar errors with other Cmdlets until I uninstalled AzureRM https://docs.microsoft.com/en-us/powershell/azure/uninstall-az-ps?view=azps-1.7.0#uninstall-the-azurerm-module

Uninstall-AzureRM
  • I uninstalled the Rm modules and I'm using Az. Its complaining my api version isn't supported. It's 2018-11-01 which is newer that the supported 2018-07-01,2018-03-01-preview,2018-02-01, etc. – jrd1989 Apr 12 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.