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.

jrd1989
  • 628
  • 10
  • 35

2 Answers2

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

Hannel
  • 651
  • 4
  • 9
  • 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 '19 at 17:37
  • You can check the module version on AZ module too https://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 '19 at 02: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
Jarnstrom
  • 705
  • 4
  • 9
  • 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 '19 at 17:38