我试图使用PowerShell删除Azure存储目录中删除Azure存储目录: -无法通过PowerShell的
# the Context is already set correctly, not showing it here though
if($myshare -eq $null)
{
$myshare=New-AzureStorageShare -Name "share" -Context $context
}
Remove-AzureStorageDirectory -ShareName "share" -Path "mycontainer/mydir/dir1" -Context $context -Confirm:$false
我收到以下错误: -
Remove-AzureStorageDirectory : The remote server returned an error: (404) Not Found. HTTP
Status Code: 404 - HTTP Error Message: The specified parent path does not exist.
At C:\test.ps1:21 char:1
+ Remove-AzureStorageDirectory -ShareName "share" -Path "mycontainer/my ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Remove-AzureStorageDirectory], StorageException
+ FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.File.Cmd
let.RemoveAzureStorageDirectory
这是怎样的我试图删除的文件夹(dir1)存在于我的存储中: -
mycontainer/mydir/dir1
因此,路径非常多。我不确定它会如何期待。
基本上'mycontainer'是我的容器。所以我不确定它是否应该成为路径的一部分。但是这个命令没有别的办法知道我的容器名是什么。我尝试在一个阶段跳过容器名称,直接使用像mydir/dir1这样的纯文件夹路径,但得到了相同的错误。你能不能在这里提供你的例子,你可以运行无错误 – Dhiraj
你能发布隐藏敏感信息的完整路径吗? – juvchan
https://mystorageaccount.blob.core.windows.net:443/mycontainer/mydir/dir1/ – Dhiraj