我試圖在Azure文件中創建共享,但似乎不起作用。我知道我必須創建一個新的存儲帳戶,因爲它不會與現有的帳戶一起工作。所以我剛剛刪除了我的空存儲帳戶並重新創建了它。Azure文件共享不起作用
然後我使用如下的Windows Azure PowerShell中的指導,但它提供了以下錯誤:
The remote name could not be resolved: 'storageaccountname.file.core.windows.net'
請注意,我已經更換了我的存儲帳戶名與「storageaccountname」與「storageaccountkey關鍵」。
PS C:\System\AzureStorageFile> import-module .\AzureStorageFile.psd1
VERBOSE: Loading module from path 'C:\System\AzureStorageFile\AzureStorageFile.psd1'.
VERBOSE: Loading 'TypesToProcess' from path 'C:\System\AzureStorageFile\Microsoft.WindowsAzure.Commands.Storage.File.types.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\System\AzureStorageFile\Microsoft.WindowsAzure.Commands.Storage.File.format.ps1xml'.
VERBOSE: Loading module from path 'C:\System\AzureStorageFile\Microsoft.WindowsAzure.Commands.Storage.File.dll'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Set-AzureStorageFileContent'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFileContent'.
VERBOSE: Importing cmdlet 'Get-AzureStorageShare'.
VERBOSE: Importing cmdlet 'New-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'New-AzureStorageShare'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageShare'.
VERBOSE: Importing cmdlet 'New-AzureStorageContext'.
VERBOSE: Exporting cmdlet 'Get-AzureStorageFile'.
VERBOSE: Exporting cmdlet 'Remove-AzureStorageFile'.
VERBOSE: Exporting cmdlet 'Set-AzureStorageFileContent'.
VERBOSE: Exporting cmdlet 'Get-AzureStorageFileContent'.
VERBOSE: Exporting cmdlet 'Get-AzureStorageShare'.
VERBOSE: Exporting cmdlet 'New-AzureStorageDirectory'.
VERBOSE: Exporting cmdlet 'New-AzureStorageShare'.
VERBOSE: Exporting cmdlet 'Remove-AzureStorageDirectory'.
VERBOSE: Exporting cmdlet 'Remove-AzureStorageShare'.
VERBOSE: Exporting cmdlet 'New-AzureStorageContext'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFileContent'.
VERBOSE: Importing cmdlet 'Get-AzureStorageShare'.
VERBOSE: Importing cmdlet 'New-AzureStorageContext'.
VERBOSE: Importing cmdlet 'New-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'New-AzureStorageShare'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageShare'.
VERBOSE: Importing cmdlet 'Set-AzureStorageFileContent'.
PS C:\System\AzureStorageFile> $ctx = New-AzureStorageContext storageaccountname storageaccountkey
PS C:\System\AzureStorageFile> $s = New-AzureStorageShare data -Context $ctx
New-AzureStorageShare : The remote name could not be resolved: 'storageaccountname.file.core.windows.net'
At line:1 char:6
+ $s = New-AzureStorageShare data -Context $ctx
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Windo...ureStorageShare:NewAzureStorageShare) [New-AzureStorageShare], StorageException
+ FullyQualifiedErrorId : NameResolutionFailure,Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet.NewAzureStorageShare
謝謝,我燒起來,現在「排隊」。任何線索啓用它需要多長時間? –
如果遇到由模糊的New-AzureStorageContext引起的錯誤,則可以通過AzureStorageFile \ New-AzureStorageContext顯式引用正確的版本。請參閱http://social.msdn.microsoft.com/Forums/windowsazure/en-US/fb0887c3-d140-4b99-a72f-62b9d07a72e8/error-running-azurestoragefile-powershell-script?forum=azureautomation – devinbost