您是否在通過圖形用戶界面更新Windows 10時面臨問題?是的,然後嘗試命令行力更新方法下載並安裝它們。
正如我們在Windows 10上知道的那樣,我們可以選擇緩慢而快速的戒指構建,使Windows Insiders甚至在公開公開之前就獲得了最新的更新。但是,由於微軟經常發行更新,有時用戶可能會使用從檢查中的傳統方法來更新Windows 10時遇到一些問題設定。
我之所以這樣說,是因為最近我的Windows 10 PC獲得了一些更新,並且每次要求我重新啟動筆記本電腦以安裝更新,但不能。因此,在這種情況下,我們可以使用命令行迫使Windows 10系統使用PowerShell或命令提示符下載和安裝最新更新。我推薦Powershell。
強制Windows 10使用PSWindowSupDate命令行更新
提示: 前進一步遵循我想推薦的給定步驟:轉到Windows 10安裝驅動器,通常是C磁碟,單擊視窗文件夾並打開軟貨物分配在那個打開的內部下載並刪除所有文件。
Windows 10使用PowerShell的強制更新
- Power Shell是Windows平台的本機和高級命令行工具。只需右鍵單擊Windows 10開始按鈕,然後選擇Windows PowerShell(admin)。
- 首先,在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
- 使用命令檢查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 : CouldNotAutoloadMatchingModulePowerShell腳本運行錯誤
- 要解決它,在Windows 10搜索欄上只需鍵入腳本和一個選項“允許本地PowerShell腳本在不簽名的情況下運行”將出現,單擊打開。
允許PowerShell本地腳本運行而無需簽名 這將使您陷入對於開發人員部分Windows 10。選擇PowerShell選項應用以下設置來執行PowerShell腳本。 “更改執行策略,以允許本地PowerShell腳本在不簽名的情況下運行。需要簽署遠程腳本。“然後單擊申請按鈕。
在PowerShell Windows 10上允許本地腳本 現在關閉PowerShell並再次以管理員的速度運行。之後使用命令:
Get-Windowsupdate
- 最後,鍵入PowerShell腳本命令以安裝Windows更新,然後重新啟動。它將允許窗口連接,下載和安裝更新 -
Install-WindowsUpdate
該命令將首先詢問您的權限並執行力更新。完成後,PowerShell將提示重新啟動Windows 10系統,用於正確安裝更新。使用命令行強制更新Windows 10
除了Powershell方法,也可以選擇命令提示,因為那隻是將其運行行政人員在Windows 10上。
檢查並獲取更新 - UsoClient StartDownload
要安裝相同的命令將是UsoClient StartInstall
。
所有三個任務的一個命令是UsoClient ScanInstallWait
完成後,重新啟動以實現更新的設備 - UsoClient RestartDevice
其他文章: