如何使用pswindowsupdate命令强行更新Windows 10

您是否在通过图形用户界面更新Windows 10时面临问题?是的,然后尝试命令行力更新方法下载并安装它们。

正如我们在Windows 10上知道的那样,我们可以选择缓慢而快速的戒指构建,使Windows Insiders甚至在公开公开之前就获得了最新的更新。但是,由于微软经常发行更新,有时用户可能会使用从检查中的传统方法来更新Windows 10时遇到一些问题设置

我之所以这样说,是因为最近我的Windows 10 PC获得了一些更新,并且每次要求我重新启动笔记本电脑以安装更新,但不能。因此,在这种情况下,我们可以使用命令行迫使Windows 10系统使用PowerShell或命令提示符下载和安装最新更新。我推荐Powershell。

强制Windows 10使用PSWindowSupDate命令行更新


提示: 前进一步遵循我想推荐的给定步骤:转到Windows 10安装驱动器,通常是C盘,单击视窗文件夹并打开软货物分配在那个打开的内部下载并删除所有文件。

删除软件分配

Windows 10使用PowerShell的强制更新


  1. Power Shell是Windows平台的本机和高级命令行工具。只需右键单击Windows 10开始按钮,然后选择Windows PowerShell(admin)。
运行Windows 10 PowerShell作为管理员
  1. 首先,在PowerShell中安装Windows Update模块,用于使用该命令:
     Install-Module PSWindowsUpdate

    上述命令的输出:

    NuGet provider is required to continue
    PowerShellGet requires NuGet provider version 'x.x.x" or newe to interact with NuGet-based repositories. The NuGet provider must be available in "C:\Program files\PackageManagement\ProviderAssemblies' or C:'Users\Trm\AppData\localPackahemanagement\ProviderAssemblies'. You can also install the NuGet provider by running install-PackageProvider - Name BuGet -MinimumVersion x.x.x -force'. DO you want PowershellGet to install and import the NuGet provider now?
    [Y] Yes [N} No [S] Suspend [?] Help (default is "Y"): Y
    Trusted repository
    You install the modules from an untrusted repository. If you trust this repository, change its installation policy value by running the Set PSRespository cmdlet. Are you sure you want to install the modules from PSGalery'?
    [Y] Yes [A] Yess to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y

  1. 使用命令检查Windows 10的最新可用更新:
    Get-Windowsupdate

    如果您收到错误:

    PS C:\WINDOWS\system32> Get-WindowsUpdate
    Get-WindowsUpdate : The 'Get-WindowsUpdate' command was found in the module 'PSWindowsUpdate', but the module could
    not be loaded. For more information, run 'Import-Module PSWindowsUpdate'.
    At line:1 char:2
    + Get-WindowsUpdate
    + ~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Get-WindowsUpdate:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

    PowerShell脚本运行错误
  1. 要解决它,在Windows 10搜索栏上只需键入脚本和一个选项“允许本地PowerShell脚本在不签名的情况下运行”将出现,单击打开。
    允许PowerShell本地脚本运行而无需签名

    这将使您陷入对于开发人员部分Windows 10。选择PowerShell选项应用以下设置来执行PowerShell脚本。 “更改执行策略,以允许本地PowerShell脚本在不签名的情况下运行。需要签署远程脚本。“然后单击申请按钮。

    在PowerShell Windows 10上允许本地脚本

    现在关闭PowerShell并再次以管理员的速度运行。之后使用命令:Get-Windowsupdate

  1. 最后,键入PowerShell脚本命令以安装Windows更新,然后重新启动。它将允许窗口连接,下载和安装更新 - Install-WindowsUpdate
    该命令将首先询问您的权限并执行力更新。完成后,PowerShell将提示重新启动Windows 10系统,用于正确安装更新。
    使用命令行强制更新Windows 10

除了Powershell方法,也可以选择命令提示,因为那只是将其运行行政人员在Windows 10上。

检查并获取更新 - UsoClient StartDownload要安装相同的命令将是UsoClient StartInstall

所有三个任务的一个命令是UsoClient ScanInstallWait

完成后,重新启动以实现更新的设备 - UsoClient RestartDevice

其他文章: