如果您想在Windows 11/10中使用winget安装 OneDrive(install OneDrive),本文将对您很方便。无论您想安装还是卸载OneDrive应用程序,您都可以使用微软(Microsoft)去年推出的Windows 包管理器(Windows Package Manager)来完成。以下是如何使用安装 (install )和 卸载 (uninstall )命令来完成工作。

Windows 11 中的 winget 是什么
WINGET是一个命令行工具,可帮助您使用(WINGET)Windows PowerShell安装、卸载和获取有关应用程序的更多信息。这个开源工具旨在供开发人员从命令行运行包。它包括执行各种操作的不同命令,例如安装、卸载、验证等。
它与Windows 10 v1809 和所有更高版本兼容。但是,如果您使用的是Windows 11,则不必下载存储库。这个开源存储库包含 1400 多个可以安装在计算机上的独特软件包,OneDrive就是其中之一。话虽这么说,如果您想使用命令行工具安装或卸载OneDrive ,请按照以下步骤操作。(OneDrive)
在开始之前,您需要确保您的计算机已连接到互联网连接,因为需要下载应用程序包。
如何在Windows 11中使用(Windows 11)WINGET安装或卸载 OneDrive(WINGET)
Windows 11/10中使用 winget 安装或卸载 OneDrive ,请执行以下步骤:
- 在任务栏搜索框中搜索 powershell 。
- 单击 以管理员身份运行 (Run as Administrator )选项。
- 单击 是 (Yes )选项。
- 输入此命令:winget install onedrive以安装 OneDrive。
- 输入此命令:winget uninstall onedrive以卸载 OneDrive。
- (Start)如果您最近安装了OneDrive ,请(OneDrive)开始在Windows 11上使用它。
要了解有关这些步骤的更多信息,请继续阅读。
首先,您需要以管理员权限打开Windows PowerShell 。为此, 在任务栏搜索框中搜索(Taskbar)powershell ,然后单击 以管理员身份运行 (Run as Administrator )选项。如果屏幕上出现 UAC提示,请单击(UAC)是 (Yes )选项。
打开Windows PowerShell窗口后,输入以下命令:
winget install onedrive

如前所述,您需要使用 install 参数在 Windows 11 计算机上安装OneDrive应用程序。输入此命令后,它会下载一个包到您的计算机并自动开始安装过程。

如果要使用 winget 命令从计算机中卸载OneDrive应用,则需要输入以下命令:
winget uninstall onedrive

输入此命令后,winget 会搜索名为OneDrive的包并相应地启动卸载过程。
完成后,您会收到一条消息,称成功卸载(Successfully uninstalled)。

重要的是要注意 winget 命令不会删除任何剩余的已卸载应用程序。为此,您可以使用第三方应用程序,例如CCleaner。
一个机翼中有多少个包?
截至今天,winget 包括 1400 多个可以使用Windows PowerShell访问的包。您可以使用 搜索(search) 命令或参数来查找您要查找的应用程序包。
阅读(Read):如何使用命令提示符完全卸载 OneDrive
如何在Windows 11中下载 winget ?
您无需在Windows 11中下载 winget,因为Windows 11默认包含此命令行实用程序。但是,如果您使用的是Windows 10,则需要按照本指南 下载和设置 Windows Package Manager。
winget 是包管理器吗?
不,winget 不是包管理器。这是使用微软(Microsoft)去年推出的Windows Package Manager的命令。您可以使用 winget 命令从官方存储库安装应用程序,从计算机中卸载应用程序等。
就这样!希望本教程帮助您在Windows 11(Windows 11)中使用 winget 命令安装或卸载 OneDrive 。
相关阅读:(Related reads:)
How to install or uninstall OneDrive using WINGET in Windows 11
Іf yоu want to install OneDrive using winget in Windows 11/10, this article will be handy for you. Whether you want to install or uninstall the OneDrive app, you can do that using Windows Package Manager, which Microsoft launched last year. Here is how you can use the install and uninstall commands to get the job done.

What is winget in Windows 11
WINGET is a command-line tool, which helps you install, uninstall, and obtain more information about an app using Windows PowerShell. This open-source tool is intended for developers to run packages from the command line. It includes different commands to perform various things such as install, uninstall, validate, etc.
It is compatible with Windows 10 v1809 and all the later versions. However, if you are using Windows 11, you do not have to download the repository. This open-source repository includes more than 1400 unique packages that you can install on your computer, and OneDrive is one of them. That being said, if you want to install or uninstall OneDrive using a command-line tool, here is how you can do that.
Before getting started, you need to ensure that your computer is connected to an internet connection since the app package needs to be downloaded.
How to install or uninstall OneDrive using WINGET in Windows 11
To install or uninstall OneDrive using winget in Windows 11/10, follow these steps:
- Search for powershell in the Taskbar search box.
- Click on the Run as Administrator option.
- Click the Yes option.
- Enter this command: winget install onedrive to install OneDrive.
- Enter this command: winget uninstall onedrive to uninstall OneDrive.
- Start using OneDrive on Windows 11 if you installed it recently.
To learn more about these steps, continue reading.
At first, you need to open Windows PowerShell with administrator privilege. For that, search for powershell in the Taskbar search box and click on the Run as Administrator option. If the UAC prompt appears on your screen, click on the Yes option.
After opening the Windows PowerShell window, enter the following command:
winget install onedrive

As mentioned earlier, you need to use the install parameter to install the OneDrive app on your Windows 11 computer. After entering this command, it downloads a package to your computer and starts the installation process automatically.

If you want to uninstall the OneDrive app from your computer using winget command, you need to enter this command:
winget uninstall onedrive

After entering this command, winget will search for the package named OneDrive and start the uninstallation process accordingly.
Once it is done, you would be greeted with a message saying Successfully uninstalled.

It is important to note that the winget command doesn’t remove any leftover of uninstalled apps. For that, you may use a third-party app such as CCleaner.
How many packages are in a winget?
As of today, winget includes more than 1400 packages that you can access using Windows PowerShell. You can use the search command or parameter to find out the app packages you are looking for.
Read: How to completely Uninstall OneDrive using Command Prompt
How do I download winget in Windows 11?
You do not need to download winget in Windows 11 since Windows 11 includes this command-line utility by default. However, if you are using Windows 10, you need to follow this guide to download and set up Windows Package Manager.
Is winget a package manager?
No, winget is not a package manager. It is the command to use the Windows Package Manager, which Microsoft launched last year. You can use the winget command to install an app from the official repository, uninstall apps from your computer, etc.
That’s all! Hope this tutorial helped you install or uninstall OneDrive using winget command in Windows 11.
Related reads: