0

我有 100 多台计算机,其硬件支持 win11,我想使用脚本,我一直在尝试将 windows 10 更新到 windows 11。我尝试使用 heresjaken 脚本“https://heresjaken.com/install -windows-10-upgrade-through-powershell-using-windows-update-assistant/" 通过更新新的 win11update 助手进行小修改,但运行脚本后会发生什么,它停留在 EULA。在参数中尝试了不同的字符串,但它不接受它。一点帮助将不胜感激。谢谢你。

下面的代码功能是下载 windows 11 助手并静默运行,但在参数中它不接受 EULA。参数似乎不适用于 Win11 更新助手。需要帮忙!

    try {
# Declarations
[string]$DownloadDir = 'C:\Temp\Windows_FU\packages'
[string]$LogDir = 'C:\Temp\Logs'
[string]$LogFilePath = [string]::Format("{0}\{1}_{2}.log", $LogDir, "$(get-date -format `"yyyyMMdd_hhmmsstt`")", $MyInvocation.MyCommand.Name.Replace(".ps1", ""))
[string]$Url = 'https://go.microsoft.com/fwlink/?linkid=2171764'
[string]$UpdaterBinary = "$($DownloadDir)\Windows11InstallationAssistant.exe"
[string]$UpdaterArguments = '/eula=1 /auto upgrade /copylogs $LogDir'
[System.Net.WebClient]$webClient = New-Object System.Net.WebClient    
4

0 回答 0