What account type is valid when referencing StorageV2 (general purpose v2).

Jones, Ennis 0 Reputation points
2024-01-01T05:23:29.92+00:00

Entering the following lines of code:

$account = New-AzCognitiveServicesAccount -ResourceGroupName cloud-shell-storage-southcentralus -name cs710032000dd678293 -Type StorageV2 general purpose v2 -SkuName S0 -Location southcentralus -CustomSubdomainName Progress

I receive this error:

New-AzCognitiveServicesAccount: A positional parameter cannot be found that accepts argument 'general'.

I've tried several times to modify the "Type" using tutorials and forums. I'm prepping for a certification exam January 13th; any help would be appreciated.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
{count} votes

1 answer

Sort by: Most helpful
  1. TP 144.6K Reputation points Volunteer Moderator
    2024-01-01T06:01:25.4233333+00:00

    Hi,

    For -Type parameter, you need to use a valid value as returned by Get-AzCognitiveServicesAccountType cmdlet. So first run command similar to below:

    Get-AzCognitiveServicesAccountType -Location southcentralus
    
    

    And then command would look similar to below (in example below I use Face since that was one of the values returned from Get-AzCognitiveServicesAccountType):

    $account = New-AzCognitiveServicesAccount -ResourceGroupName cloud-shell-storage-southcentralus -name cs710032000dd678293 -Type Face -SkuName F0 -Location southcentralus -CustomSubdomainName Progress2
    
    

    Please reference documentation for New-AzCognitiveServicesAccount:

    https://learn.microsoft.com/en-us/powershell/module/az.cognitiveservices/new-azcognitiveservicesaccount?view=azps-11.1.0

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.