更改特定用户的 OneDrive 存储空间Change a specific user's OneDrive storage space

作为 Office 365 中的全局或 SharePoint 管理员,您可以使用 Microsoft PowerShell 为特定用户设置 OneDrive 存储空间。As a global or SharePoint admin in Office 365, you can set the OneDrive storage space for a specific user by using Microsoft PowerShell.

备注

有关设置默认存储空间的信息,请参阅设置 OneDrive 用户的默认存储空间For info about setting the default storage space, see Set the default storage space for OneDrive users. 有关适用于 Office 365 计划的存储的信息,请参阅OneDrive For business 服务说明For info about the storage available for your Office 365 plan, see the OneDrive for Business service description.

更改特定用户的 OneDrive 的存储空间Change the storage space for a specific user's OneDrive

  1. 下载最新版 SharePoint Online 命令行管理程序Download the latest SharePoint Online Management Shell.

    备注

    如果已安装早期版本的 SharePoint Online 命令行管理程序,请转到 "添加或删除程序" 并卸载 "SharePoint Online 命令行管理程序"。If you installed a previous version of the SharePoint Online Management Shell, go to Add or remove programs and uninstall “SharePoint Online Management Shell.”
    在 "下载中心" 页上,选择您的语言,然后单击 "下载" 按钮。On the Download Center page, select your language and then click the Download button. 系统将要求你选择下载 x64 和 x86 .msi 文件。You’ll be asked to choose between downloading a x64 and x86 .msi file. 如果运行的是64位版本的 Windows 或 x86 文件(如果运行的是32位版本),请下载 x64 文件。Download the x64 file if you’re running the 64-bit version of Windows or the x86 file if you’re running the 32-bit version. 如果您不知道,请https://support.microsoft.com/help/13443/windows-which-operating-system参阅。If you don’t know, see https://support.microsoft.com/help/13443/windows-which-operating-system. 文件下载完成后,运行它并按照安装向导中的步骤进行操作。After the file downloads, run it and follow the steps in the Setup Wizard.

  2. 在 Office 365 中以全局管理员或 SharePoint 管理员身份连接到 SharePoint Online。要了解具体操作步骤,请参阅 SharePoint Online 命令行管理程序入门Connect to SharePoint Online as a global admin or SharePoint admin in Office 365. To learn how, see Getting started with SharePoint Online Management Shell.

  3. 运行以下命令:Run the following command:

    Set-SPOSite -Identity <user's OneDrive URL> -StorageQuota <quota>
    

    (其中_ <,用户的 onedrive> URL_是用户的 onedrive 的 url, _ <配额> _是存储空间的值(以 mb 为单位)。(Where <user's OneDrive URL> is the URL of the user's OneDrive and <quota> is the value in megabytes for the storage space.

    用户的 OneDrive URL 基于其用户名。A user’s OneDrive URL is based on their username. For example,For example,
    https://microsoft-my.sharepoint.com/personal/user1_contoso_com. 您可以在 Microsoft 365 管理中心的 "活动用户(或删除的用户)" 页上找到其用户名。You can find their username on the Active users (or Deleted users) page in the Microsoft 365 admin center.

    对于存储空间,为 1 TB 或5242880输入 5 TB 的1048576。For storage space, you would enter 1048576 for 1 TB or 5242880 for 5 TB. 最小值为 1024 MB (1 GB)。1024 MB (1 GB) is the minimum. 如果输入的值较小,则会将其向上舍入。If you enter a lower value, it will be rounded up. 如果指定的值大于用户许可证所允许的值,则该值将向下舍入到其许可证允许的最大值。If you specify a value greater than that allowed by a user's license, the value will be rounded down to the maximum value allowed by their license.

    备注

    如果要为多个用户更改存储空间,可以使用 PowerShell 来显示 OneDrive 帐户列表(使用 powershell)。If you want to change the storage space for multiple users, you can use PowerShell to Display a list of OneDrive accounts by using PowerShell. 若要禁用特定用户的 OneDrive 创建,请参阅在 SharePoint 管理中心中管理用户配置文件To disable OneDrive creation for specific users, see Manage user profiles in the SharePoint admin center.