存储资源管理器入门Get started with Storage Explorer

概述Overview

Azure 存储资源管理器是一款独立应用,可用于在 Windows、macOS 和 Linux 上轻松处理 Azure 存储数据。Azure Storage Explorer is a standalone app that enables you to easily work with Azure Storage data on Windows, macOS, and Linux. 本文介绍如何通过多种方式连接到 Azure 存储帐户并对其进行管理。In this article, you learn several ways of connecting to and managing your Azure storage accounts.

Azure 存储资源管理器

先决条件Prerequisites

以下版本的 Windows 支持 Azure 存储资源管理器:Azure Storage Explorer is supported on the following versions of Windows:

  • Windows 10(推荐)Windows 10 (recommended)
  • Windows 8Windows 8
  • Windows 7Windows 7

对于所有 Windows 版本,都需要 .NET Framework 4.6.2 或更高版本。For all versions of Windows, .NET Framework 4.6.2 or greater is required.

下载并安装存储资源管理器Download and install Storage Explorer

连接到存储帐户或服务Connect to a storage account or service

存储资源管理器提供多种连接到存储帐户的方式。Storage Explorer provides several ways to connect to storage accounts. 例如,可以:For example, you can:

  • 连接到与 Azure 订阅关联的存储帐户。Connect to storage accounts associated with your Azure subscriptions.
  • 连接到从其他 Azure 订阅共享的存储帐户和服务。Connect to storage accounts and services that are shared from other Azure subscriptions.
  • 使用 Azure 存储模拟器连接到本地存储并对其进行管理。Connect to and manage local storage by using the Azure Storage Emulator.

登录 AzureSign in to Azure

Note

如果没有 Azure 帐户,可以注册试用版If you don't have an Azure account, you can sign up for a trial .

  1. 在存储资源管理器中选择“管理帐户”,转到“帐户管理面板”。In Storage Explorer, select Manage Accounts to go to the Account Management Panel.

    管理帐户

  2. 左窗格随即显示已登录的所有 Azure 帐户。The left pane now displays all the Azure accounts you've signed in to. 若要连接到另一个帐户,请选择“添加帐户”。To connect to another account, select Add an account

  3. 若要登录到某个国家/地区云或 Azure Stack,请单击“Azure 环境”下拉列表并选择要使用的 Azure 云。If you want to sign into a national cloud or an Azure Stack, click on the Azure environment dropdown to select which Azure cloud you want to use. 选择环境后,单击“登录...”按钮。Once you have chosen your environment, click the Sign in... button. 若要登录到 Azure Stack,请参阅将存储资源管理器连接到 Azure Stack 订阅了解详细信息。If you are signing in to Azure Stack, see Connect Storage Explorer to an Azure Stack subscription for more information.

    登录选项

  4. 使用 Azure 帐户成功登录后,该帐户以及与该帐户关联的 Azure Stack 订阅会添加到左窗格中。After you successfully sign in with an Azure account, the account and the Azure subscriptions associated with that account are added to the left pane. 选择使用的 Azure 订阅,然后选择“应用”(选择“所有订阅:”切换开关可选择列出的所有 Azure 订阅,或不选择其中的任何订阅)。Select the Azure subscriptions that you want to work with, and then select Apply (Selecting All subscriptions: toggles selecting all or none of the listed Azure subscriptions).

    选择 Azure 订阅

    左窗格会显示与所选 Azure 订阅关联的存储帐户。The left pane displays the storage accounts associated with the selected Azure subscriptions.

    选择的 Azure 订阅

使用本地开发存储Work with local development storage

使用存储资源管理器,可以通过模拟器使用本地存储。With Storage Explorer, you can work with local storage by using an emulator. 使用此方法可以模拟 Azure 存储的使用,而无需在 Azure 上部署存储帐户。This approach lets you simulate working with Azure Storage without necessarily having a storage account deployed on Azure.

通过 Azure AD 添加资源Add a resource via Azure AD

  1. 单击左侧垂直工具栏上的连接按钮打开“连接”对话框。 Open the Connect Dialog by clicking on the connect button on the left hand, vertical toolbar.

    “连接到 Azure 存储”选项

  2. 使用“添加 Azure 帐户”选项登录到有权访问资源的 Azure 帐户(如果尚未执行此操作)。 If you have not already done so, use the Add an Azure Account option to sign in to the Azure Account which has access to the resource. 登录后,返回到“连接”对话框。 After signing in return to the Connect Dialog.

  3. 选择“通过 Azure Active Directory (Azure AD)添加资源”选项,然后单击“下一步”。 Select the Add a resource via Azure Active Directory (Azure AD) option and click Next.

  4. 选择有权访问所要附加的存储资源的 Azure 帐户以及该资源所在的订阅,然后单击“下一步”。 Select the Azure Account which has access to the Storage resource you want to attach and the subscription that the resource is in and then click Next.

  5. 选择要附加的资源类型,然后输入用于建立连接的信息。Choose the resource type you want to attach, and then enter the information needed to connect. 此页上的输入将会根据你要添加的资源类型而更改。The inputs on this page will change depending on what type of resource you are adding. 请确保选择正确的资源类型。Make sure to choose the correct type of resource. 填写所需的信息后,单击“下一步”。 Once you have filled in the required information click Next.

  6. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all of the information is correct. 如果所有信息看起来正确,请单击“连接”,否则请使用“后退”按钮返回上一页,以更正任何有错误的信息。 If all of the information looks correct then click Connect, otherwise return to the previous pages with the Back button to correct any wrong information.

成功添加连接后,资源树将自动导航到表示连接的节点。Once the connection is successfully added, the resource tree will automatically navigate to the node representing the connection. 如果由于某种原因未导航到该位置,请查看“本地和附加”→“存储帐户”→“(附加的容器)”→“Blob 容器”。 If for some reason it doesn't, look under Local & AttachedStorage Accounts(Attached Containers)Blob Containers. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南获取帮助。If Storage Explorer was unable to add your connection, or if you cannot access your data after successfully adding the connection, then consult the troubleshooting guide for help.

使用连接字符串Use a connection string

  1. 单击左侧垂直工具栏上的连接按钮打开“连接”对话框。 Open the Connect Dialog by clicking on the connect button on the left hand, vertical toolbar.

    “连接到 Azure 存储”选项

  2. 选择“使用连接字符串”选项并单击“下一步”。 Select the Use a connection string option and click Next.

  3. 选择连接的显示名称,并输入连接字符串。Choose a display name for your connection and enter in your connection string. Then click Next.

  4. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all of the information is correct. 如果所有信息看起来正确,请单击“连接”,否则请使用“后退”按钮返回上一页,以更正任何有错误的信息。 If all of the information looks correct then click Connect, otherwise return to the previous pages with the Back button to correct any wrong information.

成功添加连接后,资源树将自动导航到表示连接的节点。Once the connection is successfully added, the resource tree will automatically navigate to the node representing the connection. 如果由于某种原因未导航到该位置,请查看“本地和附加”→“存储帐户”。 If for some reason it doesn't, look under Local & AttachedStorage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南获取帮助。If Storage Explorer was unable to add your connection, or if you cannot access your data after successfully adding the connection, then consult the troubleshooting guide for help.

使用 SAS URIUse a SAS URI

  1. 单击左侧垂直工具栏上的连接按钮打开“连接”对话框。 Open the Connect Dialog by clicking on the connect button on the left hand, vertical toolbar.

    “连接到 Azure 存储”选项

  2. 选择“使用共享访问签名(SAS) URI”选项并单击“下一步”。 Select the Use a shared access signature (SAS) URI option and click Next.

  3. 选择连接的显示名称,并输入 SAS URI。Choose a display name for your connection and enter in your SAS URI. 适用于要附加的资源类型的服务终结点应会自动填充。The service endpoint for the type of resource you are attaching should autofill. 如果使用的是自定义终结点,则可能不会自动填充。If you are using a custom endpoint then it is possible it may not. 单击“下一步” 。Click Next.

  4. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all of the information is correct. 如果所有信息看起来正确,请单击“连接”,否则请使用“后退”按钮返回上一页,以更正任何有错误的信息。 If all of the information looks correct then click Connect, otherwise return to the previous pages with the Back button to correct any wrong information.

成功添加连接后,资源树将自动导航到表示连接的节点。Once the connection is successfully added, the resource tree will automatically navigate to the node representing the connection. 如果由于某种原因未导航到该位置,请查看“本地和附加”→“存储帐户”→“(附加的容器)”→ 适用于附加容器类型的服务节点If for some reason it doesn't, look under Local & AttachedStorage Accounts(Attached Containers)the service node for the type of container you attached. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南获取帮助。If Storage Explorer was unable to add your connection, or if you cannot access your data after successfully adding the connection, then consult the troubleshooting guide for help.

使用名称和密钥Use a name and key

  1. 单击左侧垂直工具栏上的连接按钮打开“连接”对话框。 Open the Connect Dialog by clicking on the connect button on the left hand, vertical toolbar.

    “连接到 Azure 存储”选项

  2. 选择“使用存储帐户名称和密钥”选项并单击“下一步”。 Select the Use a storage account name and key option and click Next.

  3. 选择连接的显示名称。Choose a display name for your connection.

  4. 输入存储帐户名称及其任一访问密钥。Enter in your Storage account name and either of its access keys.

  5. 选择要使用的存储域并单击“下一步”。 Choose the Storage domain to use and then click Next.

  6. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all of the information is correct. 如果所有信息看起来正确,请单击“连接”,否则请使用“后退”按钮返回上一页,以更正任何有错误的信息。 If all of the information looks correct then click Connect, otherwise return to the previous pages with the Back button to correct any wrong information.

成功添加连接后,资源树将自动导航到表示连接的节点。Once the connection is successfully added, the resource tree will automatically navigate to the node representing the connection. 如果由于某种原因未导航到该位置,请查看“本地和附加”→“存储帐户”。 If for some reason it doesn't, look under Local & AttachedStorage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南获取帮助。If Storage Explorer was unable to add your connection, or if you cannot access your data after successfully adding the connection, then consult the troubleshooting guide for help.

附加到本地仿真器Attach to a local emulator

存储资源管理器支持所有平台上的仿真器。Storage Explorer supports emulators on all platforms. 目前,官方提供的仿真器有两个:The two currently official available emulators are:

如果仿真器在默认端口上运行,则你可以使用“仿真器 - 默认端口”节点(始终可在“本地和附加”→“存储帐户”下找到该节点)来快速访问仿真器。 If your emulator is running on the default ports you can use the Emulator - Default Ports node, which can always be found under Local & AttachedStorage Accounts, to quickly access your emulator. 若要为连接使用不同的名称,或者仿真器不是在默认端口上运行,请执行以下步骤。If you want to use a different name for your connection or if your emulator is not running on the default ports, then follow the below steps.

  1. 启动仿真器。Start your emulator. 执行此操作时,请记下每种服务类型的仿真器所侦听的端口。When you do, make a note of what ports the emulator is listening on for each service type. 稍后需要知道此信息。You will need to know this information later.

    Important

    存储资源管理器不会自动启动模拟器。Storage Explorer does not automatically start your emulator. 必须自行启动。You must start it yourself.

  2. 单击左侧垂直工具栏上的连接按钮打开“连接”对话框。 Open the Connect Dialog by clicking on the connect button on the left hand, vertical toolbar.

    “连接到 Azure 存储”选项

  3. 选择“附加到本地仿真器”选项并单击“下一步”。 Select the Attach to a local emulator option and click Next.

  4. 选择连接的显示名称,并输入每种服务类型的仿真器所侦听的端口。Choose a display name for your connection and enter in the ports your emulator is listening on for each service type. 默认情况下,文本框中会包含大多数仿真器的默认端口值。By default, the text boxes will contain the default port values for most emulators. 默认情况下,“文件端口”也会保留空白,因为目前没有任何官方仿真器支持文件服务。 The Files port is also left blank by default as neither of the official emulators currently support the Files service. 不过,如果所用的仿真器确实支持文件服务,则可以输入正在使用的端口。If the emulator you are using does support it though, then you can enter in the port which is being used. 单击“下一步” 。Click Next.

  5. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all of the information is correct. 如果所有信息看起来正确,请单击“连接”,否则请使用“后退”按钮返回上一页,以更正任何有错误的信息。 If all of the information looks correct then click Connect, otherwise return to the previous pages with the Back button to correct any wrong information.

成功添加连接后,资源树将自动导航到表示连接的节点。Once the connection is successfully added, the resource tree will automatically navigate to the node representing the connection. 如果由于某种原因未导航到该位置,请查看“本地和附加”→“存储帐户”。 If for some reason it doesn't, look under Local & AttachedStorage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南获取帮助。If Storage Explorer was unable to add your connection, or if you cannot access your data after successfully adding the connection, then consult the troubleshooting guide for help.

使用连接字符串连接到 Azure Cosmos DB 帐户Connect to an Azure Cosmos DB account by using a connection string

除了通过 Azure 订阅管理 Azure Cosmos DB 帐户外,连接到 Azure Cosmos DB 的另一种方法是使用连接字符串。Besides manage Azure Cosmos DB accounts through Azure subscription, an alternative way of connecting to an Azure Cosmos DB is to use a connection string. 按照以下步骤可使用连接字符串进行连接。Use the following steps to connect using a connection string.

  1. 在左侧树中找到“本地和附加” ,右键单击“Azure Cosmos DB 帐户” ,然后选择“连接到 Azure Cosmos DB...” Find Local and Attached in the left tree, right-click Azure Cosmos DB Accounts, choose Connect to Azure Cosmos DB...

    通过连接字符串连接到 Azure Cosmos DB

  2. 选择 Azure Cosmos DB API,粘贴“连接字符串”,然后单击“确定”连接 Azure Cosmos DB 帐户。Choose Azure Cosmos DB API, paste your Connection String, and then click OK to connect Azure Cosmos DB account. 有关检索连接字符串的信息,请参阅获取连接字符串For information on retrieving the connection string, see Get the connection string.

    连接字符串

通过 URI 连接到 Azure Data Lake StoreConnect to Azure Data Lake Store by URI

如果需要访问某些资源,但这些资源在订阅中不存在,If you want to get access to the resources, which do not exist in your subscription. 而其他人授予了你相关权限,可以获取资源的 URI,But others grant you to get the Uri for the resources. 在这种情况下,可以在登录后使用该 URI 连接到 Data Lake Store。In this case, you can connect to Data Lake Store using the Uri after you have signed in. 请参阅以下步骤。Refer to following steps.

  1. 打开存储资源管理器。Open Storage Explorer.

  2. 在左窗格中,展开“本地和附加” 。In the left pane, expand Local and Attached.

  3. 右键单击“Data Lake Store”,然后从上下文菜单中选择“连接到 Data Lake Store...” Right-click Data Lake Store, and - from the context menu - select Connect to Data Lake Store....

    “连接到 Data Lake Store”上下文菜单

  4. 输入 URI,然后该工具就会导航到刚输入的 URL 的位置。Enter the Uri, then the tool navigates to the location of the URL you just entered.

    “连接到 Data Lake Store”上下文对话框

    “连接到 Data Lake Store”操作结果

在存储资源管理器中生成 SASGenerate a SAS in Storage Explorer

帐户级 SASAccount level SAS

  1. 右键单击要共享的存储帐户,并选择“获取共享访问签名...”。 Right-click the storage account you want share, and then select Get Shared Access Signature....

    “获取 SAS”上下文菜单选项

  2. 在“生成共享访问签名” 对话框中,指定要授予该帐户的时间范围和权限,然后单击“创建”按钮 。In the Generate Shared Access Signature dialog box, specify the time frame and permissions that you want for the account, and then click the Create button.

    “获取 SAS”对话框

  3. 现在可将“连接字符串”或原始“查询字符串”复制到剪贴板。 You can now either copy the Connection string or the raw Query string to your clipboard.

服务级 SASService level SAS

如何在存储资源管理器中获取 Blob 容器的 SASHow to get a SAS for a blob container in Storage Explorer

搜索存储帐户Search for storage accounts

如果需要查找某个存储资源并且不知道它的所在位置,可以使用左窗格顶部的搜索框来搜索该资源。If you need to find a storage resource and do not know where it is, you can use the search box at the top of the left pane to search for the resource.

在搜索框中键入内容时,左窗格会显示与当前已输入搜索值匹配的所有资源。As you type in the search box, the left pane displays all resources that match the search value you've entered up to that point. 例如,以下屏幕截图显示了“终结点”的搜索结果:For example, a search for endpoints is shown in the following screenshot:

存储帐户搜索

Note

使用“帐户管理面板”取消选择不包含所要搜索的项的所有订阅,以改善搜索执行时间。Use the Account Management Panel to deselect any subscriptions that do not contain the item you are searching for to improve the execution time of your search. 还可以右键单击某个节点,然后选择“从此处搜索”,从特定的节点开始搜索。You can also right-click on a node and choose Search From Here to start searching from a specific node.

后续步骤Next steps