locked
What is the syntax for "a valid name for a file share of Microsoft Azure File Servce." RRS feed

  • Question

  • I'm attempting the following Azure PowerShell command with the following result:

    PS C:\AzureAccount-rwright0@verizon.net\PowerShellScripts> $Share = New-AzureStorageShare $ShareName -Context $Context
    New-AzureStorageShare : The given share name/prefix 'WSR-0-Share' is not a valid name for a file share of Microsoft
    Azure File Service.
    At line:1 char:10
    + $Share = New-AzureStorageShare $ShareName -Context $Context
    +          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [New-AzureStorageShare], ArgumentException
        + FullyQualifiedErrorId : ArgumentException,Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet.NewAzureStorageSha
       re

    https://msdn.microsoft.com/en-us/library/dn806378.aspx does not mention anything about "a valid name for a file share" as the error message does.

    What's the answer to this problem?


    Thanks for the outstanding help.

    • Moved by Prasant Chhetri Tuesday, April 14, 2015 3:33 AM Moving to appropriate forum
    Monday, April 13, 2015 11:26 PM

Answers

All replies

  • Hi Ron,

    Thank you for your post.

    As you must be aware Azure File Service is in Preview, have you signed up for the service?

    If you have not, you can go to the Microsoft Azure Preview Portal, and sign up for the Microsoft Azure Files service.

    If you have signed up already, the please check the below links and check if it helps.

    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx

    http://blogs.technet.com/b/canitpro/archive/2014/09/23/step-by-step-create-a-file-share-in-azure.aspx

    Regards,

    Mekh.


    • Edited by Mekh Subba Tuesday, April 14, 2015 10:24 AM .
    Tuesday, April 14, 2015 10:24 AM
  • When I try to create a share on my "wsr9storaccount", it works. When I try to create a share on my "wsr0storaccount" if fails as described.

    When I try to create a new share using the new portal, it tells me that I have to create a new subscription even though both storage accounts (wsr0storaccount and wsr9storaccount) are in the same subscription.  I don't want to create a new subscription.  I just want a function that already works for one storage account to work for the other as well.


    Thanks for the outstanding help.

    Tuesday, April 14, 2015 9:37 PM
  • Hi Ron. Please check out this link for syntax https://msdn.microsoft.com/en-us/library/azure/dn167011.aspx
    Wednesday, April 15, 2015 4:19 PM
  • Contrary to the title of this thread, the real problem is not the syntax of the share name.  In my wsr9storaccount I have a share named "utilities".  When I try to create the "utilities" share for my wsr0storaccount, it does not display an error message about the share having an invalid format.  Instead, it just hangs.  The command that hangs is:

    New-AzureStorageShare -Context $Context -Name "utilities"

    ... where $Context applies to the "wsr0storaccount" create as follows:

    New-AzureStorageContext -StorageAccountName "wsr0storaccount" -StorageAccountKey $StorageAccountKey

    I think the problem is that the wsr0storaccount does not have a file endpoint.  How do I create the https://wsr0storaccount.file.core.windows.net/ endpoint for the wsr0storaccount?


    Thanks for the outstanding help.

    Thursday, April 16, 2015 3:44 PM