{"id":1223,"date":"2026-09-18T12:00:06","date_gmt":"2026-09-18T04:00:06","guid":{"rendered":"https:\/\/www.x4s.cn\/?p=1223"},"modified":"2026-09-18T13:53:04","modified_gmt":"2026-09-18T05:53:04","slug":"%e9%80%9a%e8%bf%87%e8%ae%a1%e7%ae%97%e6%9c%ba%e5%88%97%e8%a1%a8%e6%89%b9%e9%87%8f%e5%8d%87%e7%ba%a7win11","status":"publish","type":"post","link":"https:\/\/www.x4s.cn\/?p=1223","title":{"rendered":"\u901a\u8fc7\u8ba1\u7b97\u673a\u5217\u8868\u6279\u91cf\u5347\u7ea7Win11"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728\u6b64\u524d\u5355\u673a\u4f7f\u7528sc\u6307\u4ee4\u8fdc\u7a0b\u66f4\u65b0Win11\u5927\u7248\u672c\u7684\u6280\u672f\u4e0a\uff0c\u5f15\u5165\u8ba1\u7b97\u673a\u5217\u8868\u6267\u884c\u81ea\u52a8\u626b\u63cf\u3001\u81ea\u52a8\u63a8\u9001\u66f4\u65b0\u5e76\u4fdd\u5b58\u5931\u8d25\u5217\u8868\u7684\u65b9\u6848\uff0c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u5c06<strong>\u63a7\u5236\u6d41<\/strong>\u4e0e<strong>\u6570\u636e\u6d41\uff08TXT\u5217\u8868\u6587\u4ef6\uff09<\/strong>\u5f7b\u5e95\u5206\u79bb\uff0c\u4f60\u53ef\u4ee5\u5b9e\u73b0\u5b8c\u5168\u81ea\u52a8\u5316\u7684\u201c\u6d41\u6c34\u7ebf\u201d\u5f0f\u5347\u7ea7\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3a\u4e86\u5b8c\u7f8e\u5b9e\u73b0\u4f60\u7684\u9700\u6c42\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u6216\u8c03\u6574 3 \u4e2a\u6587\u4ef6\u3002\u5b83\u4eec\u5168\u90e8\u653e\u5728<strong>\u63a7\u5236\u7aef\u8ba1\u7b97\u673a<\/strong>\u7684\u540c\u4e00\u4e2a\u6587\u4ef6\u5939\u4e0b\uff08\u4f8b\u5982 <code>F:\\Win11\\ISO\\<\/code>\uff09\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>list1.txt<\/code><\/strong>\uff1a\u4f60\u5728\u5f00\u59cb\u524d\uff0c\u628a\u6240\u6709\u8981\u68c0\u67e5\u7684\u8ba1\u7b97\u673a\u540d\u4e00\u884c\u4e00\u4e2a\u5199\u5728\u8fd9\u91cc\u3002<\/li>\n\n\n\n<li><strong><code>0_Batch_Check.ps1<\/code><\/strong>\uff08\u96f7\u8fbe\u63a2\u6d4b\u811a\u672c\uff09\uff1a\u81ea\u52a8\u8bfb\u53d6 <code>list1.txt<\/code>\uff0c\u6d4b\u8bd5\u901a\u8fc7\u7684\u81ea\u52a8\u5199\u5165 <code>list2.txt<\/code>\u3002<\/li>\n\n\n\n<li><strong><code>1_Auto_Upgrade.bat<\/code><\/strong>\uff08\u81ea\u52a8\u5316\u5347\u7ea7\u4e3b\u63a7\uff09\uff1a<strong>\u65e0\u9700\u4eba\u5de5\u624b\u52a8\u8f93\u5165<\/strong>\uff0c\u81ea\u52a8\u8bfb\u53d6 <code>list2.txt<\/code> \u9010\u53f0\u6267\u884c\u5347\u7ea7\u3002\u5982\u679c\u54ea\u53f0\u5931\u8d25\uff0c\u81ea\u52a8\u8bb0\u5f55\u5230 <code>list3.txt<\/code>\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u811a\u672c\u4ee3\u7801\uff1a<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u51c6\u5907\u5de5\u4f5c\uff1a\u521b\u5efa\u521d\u59cb\u540d\u5355 <code>list1.txt<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u63a7\u5236\u7aef\u811a\u672c\u76ee\u5f55\u4e0b\u65b0\u5efa\u4e00\u4e2a <code>list1.txt<\/code>\uff0c\u628a\u76ee\u6807\u8ba1\u7b97\u673a\u540d\u6572\u8fdb\u53bb\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>F202400507\nF201900817\nF202000903\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u6b65\uff1a\u6df1\u5ea6\u63a2\u6d4b\u5e76\u81ea\u52a8\u751f\u6210\u5408\u683c\u540d\u5355\uff08PowerShell\u7248\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u5c06\u4ee5\u4e0b\u4ee3\u7801\u4fdd\u5b58\u4e3a <strong><code>0_Batch_Check.ps1<\/code><\/strong>\u3002\u5b83\u4f1a\u8bfb\u53d6 <code>list1.txt<\/code>\uff0c\u5e76\u5728\u7b5b\u51fa\u53ca\u683c\u751f\u540e\u81ea\u52a8\u521b\u5efa\uff08\u6216\u8986\u76d6\uff09 <code>list2.txt<\/code>\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># ==================================================\n# \u4fdd\u5b58\u4e3a: 0_Batch_Check.ps1 (\u53f3\u952e\u4f7f\u7528 PowerShell \u8fd0\u884c)\n# ==================================================\nclear\n\\(ScriptDir = Split-Path -Parent\\)MyInvocation.MyCommand.Definition\nSet-Location \\$ScriptDir\n\n\\(List1Path = \"\\)ScriptDir\\list1.txt\"\n\\(List2Path = \"\\)ScriptDir\\list2.txt\"\n\nif (!(Test-Path \\$List1Path)) {\n    Write-Error \"\u627e\u4e0d\u5230\u6e90\u8ba1\u7b97\u673a\u5217\u8868\u6587\u4ef6 list1.txt\uff0c\u8bf7\u5148\u521b\u5efa\u5b83\uff01\"\n    Read-Host \"\u6309\u56de\u8f66\u9000\u51fa...\"; exit\n}\n\n# \u6e05\u7a7a\u4e0a\u4e00\u6b21\u7684 list2.txt\nif (Test-Path \\(List2Path) { Remove-Item\\)List2Path -Force }\n\n\\$ComputerList = Get-Content \\(List1Path \\vert{} Where-Object {\\)_.Trim() -ne \"\" }\n\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \"   \u81ea\u52a8\u5316\u6d41\u6c34\u7ebf &#91;\u7b2c 1 \u6b65]: \u6279\u91cf\u8bfb\u53d6 list1 \u6df1\u5ea6\u626b\u63cf    \" -ForegroundColor Cyan\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \"\u5f85\u68c0\u67e5\u603b\u6570: \\((\\)ComputerList.Count) \u53f0`n\"\n\n&#91;string]::Format(\"{0,-15} | {1,-10} | {2,-12} | {3,-10}\", \"\u8ba1\u7b97\u673a\u540d\/IP\", \"Ping\u72b6\u6001\", \"445\u7aef\u53e3\", \"\u5904\u7406\u7ed3\u679c\") | Write-Host -ForegroundColor White\nWrite-Host (\"-\" * 60)\n\n$ReadyCount = 0\n\nforeach ($Computer in $ComputerList) {\n    $Computer = $Computer.Trim()\n    $PingStatus = Test-Connection -ComputerName $Computer -Count 1 -Quiet -ErrorAction SilentlyContinue\n    \n    if ($PingStatus) {\n        $PortStatus = Test-NetConnection -ComputerName $Computer -Port 445 -WarningAction SilentlyContinue\n        if ($PortStatus.TcpTestSucceeded) {\n            # \u5b8c\u7f8e\u7b26\u5408\u8981\u6c42\uff0c\u5199\u5165\u5217\u88682\n            Add-Content -Path $List2Path -Value $Computer\n            &#91;string]::Format(\"{0,-15} | {1,-10} | {2,-12} | {3,-10}\", $Computer, \"   \u5728\u7ebf\", \"\u5f00\u542f\", \"\u5df2\u52a0\u5165 list2.txt\") | Write-Host -ForegroundColor Green\n            $ReadyCount++\n            continue\n        }\n        &#91;string]::Format(\"{0,-15} | {1,-10} | {2,-12} | {3,-10}\", $Computer, \"   \u5728\u7ebf\", \"\u62e6\u622a\", \"\u9632\u706b\u5899\u963b\u6321\uff0c\u8df3\u8fc7\") | Write-Host -ForegroundColor Yellow\n    } else {\n        &#91;string]::Format(\"{0,-15} | {1,-10} | {2,-12} | {3,-10}\", $Computer, \"\u79bb\u7ebf\", \"  --  \", \"\u672a\u5f00\u673a\uff0c\u8df3\u8fc7\") | Write-Host -ForegroundColor Red\n    }\n}\n\nWrite-Host \"`n==================================================\" -ForegroundColor Cyan\nWrite-Host \" \u626b\u63cf\u5b8c\u6210\uff01\u5171\u8ba1 &#91; \\$ReadyCount ] \u53f0\u8ba1\u7b97\u673a\u6210\u529f\u5199\u5165 list2.txt\" -ForegroundColor Green\nWrite-Host \" \u4e0b\u4e00\u6b65\uff1a\u8bf7\u53cc\u51fb\u8fd0\u884c 1_Auto_Upgrade.bat \u5f00\u59cb\u65e0\u4eba\u503c\u5b88\u5347\u7ea7\u3002\" -ForegroundColor Yellow\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nRead-Host \"\u6309\u4efb\u610f\u952e\u9000\u51fa\u63a2\u6d4b\u7a0b\u5e8f...\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u8c28\u614e\u4f7f\u7528\u6b64\u7c7b\u4ee3\u7801\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\u6b65\uff1a\u81ea\u52a8\u8bfb\u53d6\u5217\u88682\u7fa4\u53d1\u5347\u7ea7\uff0c\u5931\u8d25\u8bb0\u5165\u5217\u88683\uff08CMD \u6279\u5904\u7406\u7248\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u5c06\u4ee5\u4e0b\u4ee3\u7801\u4fdd\u5b58\u4e3a <strong><code>1_Auto_Upgrade.bat<\/code><\/strong>\uff08\u786e\u4fdd\u4f7f\u7528 <strong>ANSI<\/strong> \u7f16\u7801\u4fdd\u5b58\uff09\u3002\u5b83\u4f1a\u5b8c\u5168\u81ea\u52a8\u8bfb\u53d6 <code>list2.txt<\/code>\uff0c\u5168\u7a0b<strong>\u514d\u4ea4\u4e92<\/strong>\u81ea\u52a8\u63a8\u8fdb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@echo off\nchcp 936 >nul\ncls\n\n:: ==========================================\n::   \u56fa\u5316\u7684\u57fa\u7840\u914d\u7f6e\u4fe1\u606f\n:: ==========================================\nset SRC_ISO=\\\\F202300503\\Win11\\iso\\Win11_26200.9445_noTPM_20260918.iso\nset SRC_DIR=\\\\F202300503\\Win11\\iso\nset ISO_NAME=Win11_26200.9445_noTPM_20260918.iso\nset ADMIN_USER=administrator\nset ADMIN_PASS=&lt;\u4f60\u7684\u7ba1\u7406\u5458\u5bc6\u7801>\n\nset LIST2=list2.txt\nset LIST3=list3.txt\n\necho ==================================================\necho   Windows 11 \u5c40\u57df\u7f51\u6d41\u6c34\u7ebf\u5b8c\u5168\u81ea\u52a8\u5316\u5347\u7ea7\u63a7\u5236\u53f0\necho ==================================================\necho.\n\nif not exist \"%LIST2%\" (\n    echo &#91;\u9519\u8bef] \u627e\u4e0d\u5230\u5c31\u7eea\u540d\u5355 %LIST2%\uff0c\u8bf7\u5148\u8fd0\u884c 0_Batch_Check.ps1\uff01\n    pause\n    exit\n)\n\n:: \u521d\u59cb\u5316\u6216\u6e05\u7a7a\u4e0a\u4e00\u6b21\u7684\u5931\u8d25\u8bb0\u5f55\necho :: \u5347\u7ea7\u5931\u8d25\u8ba1\u7b97\u673a\u540d\u5355 (\u751f\u6210\u65f6\u95f4: %date% %time%) > \"%LIST3%\"\n\necho \u6b63\u5728\u8bfb\u53d6 %LIST2% \u5e76\u51c6\u5907\u5f00\u59cb\u5168\u81ea\u52a8\u65e0\u4eba\u503c\u5b88\u5347\u7ea7...\necho --------------------------------------------------\n\n:: \u6838\u5fc3\u5faa\u73af\uff1a\u904d\u5386\u8bfb\u53d6\u5217\u88682\nfor \/f \"tokens=*\" %%i in (%LIST2%) do (\n    set \"TARGET=%%i\"\n    call :ProcessUpgrade \"%%i\"\n)\n\necho.\necho ==================================================\necho   \ud83c\udf89 \u6240\u6709\u5c31\u7eea\u8ba1\u7b97\u673a\u5904\u7406\u5b8c\u6bd5\uff01\necho   \u5982\u679c\u5b58\u5728\u5347\u7ea7\u5931\u8d25\u7684\u673a\u5668\uff0c\u8bf7\u67e5\u770b %LIST3%\necho ==================================================\npause\nexit\n\n:: ==========================================\n::   \u5b50\u7a0b\u5e8f\uff1a\u5355\u53f0\u8ba1\u7b97\u673a\u5347\u7ea7\u903b\u8f91\n:: ==========================================\n:ProcessUpgrade\nset \"CURR_TARGET=%~1\"\necho.\necho &#91;\u6b63\u5728\u5904\u7406] ----------^> \u76ee\u6807\u673a: %CURR_TARGET%\n\necho   &#91;1\/4] \u5efa\u7acb IPC$ \u7ba1\u9053...\nnet use \\\\%CURR_TARGET%\\ipc$ \"%ADMIN_PASS%\" \/user:%ADMIN_USER% >nul 2>nul\nif errorlevel 1 (\n    echo   &#91;\u5931\u8d25] \u65e0\u6cd5\u5efa\u7acb\u7ba1\u9053\u8fde\u63a5\uff01\n    echo %CURR_TARGET% - \u65e0\u6cd5\u5efa\u7acbIPC\u7ba1\u9053\u8fde\u63a5 >> \"%LIST3%\"\n    goto :eof\n)\n\necho   &#91;2\/4] \u521b\u5efa\u8fdc\u7a0b D:\\Temp \u76ee\u5f55...\nif not exist \"\\\\%CURR_TARGET%\\d$\\Temp\" mkdir \"\\\\%CURR_TARGET%\\d$\\Temp\" >nul 2>nul\n\necho   &#91;3\/4] \u8de8\u7f51\u7edc\u4f20\u8f93\u5927\u6587\u4ef6 (Robocopy \u4f20\u8f93\u4e2d)...\nrobocopy \"%SRC_DIR%\" \"\\\\%CURR_TARGET%\\d$\\Temp\" \"%ISO_NAME%\" \/Z \/R:5 \/W:5 >nul\nif errorlevel 8 (\n    echo   &#91;\u5931\u8d25] \u6587\u4ef6\u590d\u5236\u8fc7\u7a0b\u4e2d\u53d1\u751f\u4e25\u91cd\u9519\u8bef\uff01\n    echo %CURR_TARGET% - Robocopy\u6587\u4ef6\u590d\u5236\u5931\u8d25 >> \"%LIST3%\"\n    goto :eof\n)\ncopy \/Y \"local_upgrade_final.bat\" \"\\\\%CURR_TARGET%\\d$\\Temp\\\" >nul\n\necho   &#91;4\/4] \u4e0b\u53d1\u5e95\u5c42\u670d\u52a1\uff0c\u9690\u5f62\u89e6\u53d1\u672c\u5730\u5347\u7ea7...\nsc.exe \\\\%CURR_TARGET% create WinUpgrade binPath= \"cmd.exe \/c D:\\Temp\\local_upgrade_final.bat\" start= demand type= own >nul 2>nul\nsc.exe \\\\%CURR_TARGET% start WinUpgrade >nul 2>nul\nif errorlevel 1 (\n    :: \u6ce8\u610f\uff1a\u82e5sc start\u62a51053\u9519\u8bef\uff0c\u5176\u5b9e\u7cfb\u7edf\u5df2\u7ecf\u8d77\u8dd1\u4e86\u3002\u6b64\u5904\u4e3b\u8981\u6293\u65e0\u6743\u6216\u627e\u4e0d\u5230\u670d\u52a1\u7684\u786c\u9519\u8bef\u3002\n    sc.exe \\\\%CURR_TARGET% query WinUpgrade 2>&amp;1 | findstr \/i \"RUNNING START_PENDING\" >nul\n    if errorlevel 1 (\n        echo   &#91;\u5931\u8d25] \u8fdc\u7a0b SC \u670d\u52a1\u672a\u80fd\u6210\u529f\u62c9\u8d77\u811a\u672c\uff01\n        echo %CURR_TARGET% - SC\u8fdc\u7a0b\u89e6\u53d1\u5931\u8d25 >> \"%LIST3%\"\n        sc.exe \\\\%CURR_TARGET% delete WinUpgrade >nul 2>nul\n        goto :eof\n    )\n)\nsc.exe \\\\%CURR_TARGET% delete WinUpgrade >nul 2>nul\n\necho   System_Layout_OK: %CURR_TARGET% \u8fdc\u7a0b\u90e8\u7f72\u6210\u529f\uff0c\u5df2\u9690\u5f62\u5728\u540e\u53f0\u8d77\u8dd1\uff01\ngoto :eof\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6d41\u6c34\u7ebf\u6807\u51c6\u4f5c\u4e1a\u6d41\u7a0b<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u5f55\u5165<\/strong>\uff1a\u628a\u516c\u53f8\u51e0\u767e\u53f0\u8ba1\u7b97\u673a\u540d\u5f80 <code>list1.txt<\/code> \u91cc\u4e00\u8d34\u3002<\/li>\n\n\n\n<li><strong>\u7b5b\u67e5<\/strong>\uff1a\u53f3\u952e <strong><code>0_Batch_Check.ps1<\/code> -> \u4f7f\u7528 PowerShell \u8fd0\u884c<\/strong>\u3002\u559d\u676f\u8336\uff0c\u7b49\u5b83\u5237\u5b8c\uff0c\u5b8c\u5de5\u540e\u4f60\u4f1a\u53d1\u73b0\u76ee\u5f55\u4e0b\u591a\u4e86\u4e00\u4e2a <code>list2.txt<\/code>\uff0c\u91cc\u9762\u5168\u90fd\u662f\u5728\u7ebf\u4e14\u9632\u706b\u5899\u6253\u901a\u7684\u201c\u4f18\u8d28\u76ee\u6807\u201d\u3002<\/li>\n\n\n\n<li><strong>\u8f70\u70b8<\/strong>\uff1a\u76f4\u63a5\u53cc\u51fb <strong><code>1_Auto_Upgrade.bat<\/code><\/strong>\u3002\u5b83\u4f1a\u50cf\u4f20\u9001\u5e26\u4e00\u6837\uff0c\u81ea\u52a8\u8bfb <code>list2.txt<\/code>\uff0c\u7b2c\u4e00\u53f0\u4f20\u5b8c\u5b8c\u5de5\uff0c\u7acb\u9a6c\u81ea\u52a8\u8df3\u5230\u7b2c\u4e8c\u53f0\u3002\u4f60\u5b8c\u5168\u4e0d\u9700\u8981\u76ef\u7740\u5c4f\u5e55\u5b88\u5019\u3002<\/li>\n\n\n\n<li><strong>\u6536\u5c3e<\/strong>\uff1a\u5168\u90e8\u7ed3\u675f\u540e\uff0c\u5982\u679c\u6709\u673a\u5668\u56e0\u4e3a\u7f51\u7edc\u6ce2\u52a8\u3001\u4e2d\u9014\u5173\u673a\u6216\u4f20\u8f93\u906d\u9047\u5f02\u5e38\u5bfc\u81f4\u5931\u8d25\uff0c\u76f4\u63a5\u6253\u5f00 <code>list3.txt<\/code>\uff0c\u91cc\u9762\u4f1a\u6e05\u6e05\u695a\u695a\u5199\u7740\u662f\u54ea\u53f0\u673a\u5668\u3001\u5728\u54ea\u4e2a\u73af\u8282\u5931\u8d25\u4e86\uff0c\u65b9\u4fbf\u4f60\u7cbe\u51c6\u552e\u540e\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u6279\u91cf\u6293\u53d6\u5c40\u57df\u7f51\u5185\u5df2\u5f00\u673a\u7684\u8bbe\u5907IP\u5730\u5740\u548cMAC<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u662f\u57fa\u4e8e\u4e0a\u8ff0\u6279\u91cf\u66f4\u65b0\u7684\u4e00\u4e2a\u8865\u5145\uff0c\u9488\u5bf9\u5df2\u5173\u673a\u65e0\u6cd5\u6267\u884c\u66f4\u65b0\u7684\u8bbe\u5907\u901a\u8fc7\u65e5\u5e38\u626b\u63cf\u83b7\u53d6Mac\u5730\u5740\uff0c\u5e76\u5b9e\u73b0\u5524\u9192\uff0c\u4ee5\u4fbf\u6267\u884c\u7cfb\u7edf\u66f4\u65b0\uff1b\u4f7f\u7528\u7eaf\u6587\u672c\u63a7\u5236\u7684<strong>\u5168\u81ea\u52a8\u5316\u6d41\u6c34\u7ebf\u90e8\u7f72\u7cfb\u7edf<\/strong>\u76ee\u524d\u5df2\u7ecf\u5b8c\u5168\u5951\u5408\u4f60\u7684\u751f\u4ea7\u73af\u5883\u3002\u5728\u5f00\u59cb\u5bf9\u5927\u6279\u91cf\u7684 <code>list2.txt<\/code> \u7edf\u4e00\u7fa4\u53d1\u524d\uff0c\u5efa\u8bae\u5148\u5728 <code>list1.txt<\/code> \u91cc\u53ea\u7559 <strong>1-2 \u53f0\u6d4b\u8bd5\u673a<\/strong>\u5b8c\u6574\u8d70\u4e00\u904d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u6b65\uff1a\u3010\u8d44\u4ea7\u5f55\u5165\u3011\u5728\u5f00\u673a\u65f6\u4e00\u952e\u8fdc\u7a0b\u6293\u53d6 MAC\uff08PowerShell \u7248\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u5c06\u4ee5\u4e0b\u4ee3\u7801\u4fdd\u5b58\u4e3a <strong><code>0_Collect_MAC.ps1<\/code><\/strong>\u3002\u5f53\u5927\u6279\u7535\u8111\u5f00\u673a\u5728\u7ebf\u65f6\uff0c\u53f3\u952e\u8fd0\u884c\u5b83\u3002\u5b83\u4f1a\u81ea\u52a8\u8bfb\u53d6 <code>list1.txt<\/code>\uff0c\u628a\u6240\u6709\u5728\u7ebf\u673a\u5668\u7684 MAC \u8fdc\u7a0b\u6293\u4e0b\u6765\u5b58\u8fdb <code>wol_database.csv<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># ==================================================\n# \u4fdd\u5b58\u4e3a: 0_Collect_MAC.ps1 (\u53f3\u952e\u4f7f\u7528 PowerShell \u8fd0\u884c)\n# \u4f5c\u7528: \u8fdc\u7a0b\u6279\u91cf\u6293\u53d6 list1.txt \u4e2d\u5728\u7ebf\u8ba1\u7b97\u673a\u7684 MAC\uff0c\u751f\u6210\u672c\u5730\u8d44\u4ea7\u5e93\n# ==================================================\nclear\nScriptDir = Split-Path -Parent MyInvocation.MyCommand.Definition\nSet-Location \\$ScriptDir\n\nList1Path = \"ScriptDir\\list1.txt\"\nDbPath = \"ScriptDir\\wol_database.csv\"\n\nif (!(Test-Path \\$List1Path)) {\n    Write-Error \"\u627e\u4e0d\u5230\u6e90\u8ba1\u7b97\u673a\u5217\u8868\u6587\u4ef6 list1.txt\uff0c\u8bf7\u5148\u521b\u5efa\u5b83\uff01\"\n    Read-Host \"\u6309\u56de\u8f66\u9000\u51fa...\"; exit\n}\n\n# \u5982\u679c\u6ca1\u6709\u8d44\u4ea7\u5e93\uff0c\u521b\u5efa\u5e26\u8868\u5934\u7684\u7a7a\u5e93\nif (!(Test-Path \\$DbPath)) {\n    \"ComputerName,MAC\" | Out-File -FilePath \\$DbPath -Encoding UTF8\n}\n\n\\$ComputerList = Get-Content List1Path | Where-Object _.Trim() -ne \"\" }\nDatabase = Import-Csv -Path DbPath -Encoding UTF8\n\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \"     \u5c40\u57df\u7f51 MAC \u8d44\u4ea7\u5e93\u81ea\u52a8\u91c7\u96c6\/\u66f4\u65b0\u63a7\u5236\u53f0          \" -ForegroundColor Cyan\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \"\u6b63\u5728\u626b\u63cf\u5e76\u6536\u96c6\uff0c\u8bf7\u7a0d\u5019...`n\" -ForegroundColor Yellow\n\nforeach ($Computer in $ComputerList) {\n    $Computer = $Computer.Trim()\n    \n    # \u68c0\u67e5\u662f\u5426\u5728\u7ebf\n    $PingStatus = Test-Connection -ComputerName $Computer -Count 1 -Quiet -ErrorAction SilentlyContinue\n    if (!$PingStatus) {\n        Write-Host \"&#91;$Computer] \u5f53\u524d\u79bb\u7ebf\uff0c\u65e0\u6cd5\u6293\u53d6 MAC\u3002\u53ef\u5728\u5176\u5f00\u673a\u65f6\u91cd\u65b0\u8fd0\u884c\u6b64\u811a\u672c\u3002\" -ForegroundColor Red\n        continue\n    }\n\n    # \u8fdc\u7a0b\u6293\u53d6\u6d3b\u52a8\u7f51\u5361\u7684 MAC \u5730\u5740 (\u901a\u8fc7\u539f\u751f CIM\/WMI \u8fdc\u7a0b\u8c03\u7528\uff0c\u65e0\u89c6 wmic \u88ab\u780d)\n    try {\n        $Mac = Get-CimInstance -ComputerName $Computer -ClassName Win32_NetworkAdapter -ErrorAction Stop | \n               Where-Object { $_.NetConnectionStatus -eq 2 -and $_.PhysicalAdapter -eq $true } | \n               Select-Object -ExpandProperty MACAddress -First 1\n    } catch {\n        $Mac = $null\n    }\n\n    if ($Mac) {\n        # \u89c4\u8303\u5316 MAC \u683c\u5f0f\uff08\u7edf\u4e00\u8f6c\u6362\u4e3a\u6a2a\u6760\u5206\u9694\uff09\n        $Mac = $Mac.Replace(\":\", \"-\")\n        \n        # \u68c0\u67e5\u8d44\u4ea7\u5e93\u4e2d\u662f\u5426\u5df2\u5b58\u5728\u8be5\u8ba1\u7b97\u673a\n        $Exist = $Database | Where-Object { $_.ComputerName -eq $Computer }\n        if (!$Exist) {\n            # \u5f55\u5165\u65b0\u8d44\u4ea7\n            \"$Computer,$Mac\" | Out-File -FilePath $DbPath -Append -Encoding UTF8\n            Write-Host \"&#91;$Computer] \u6210\u529f\u6293\u53d6 MAC: $Mac (\u5df2\u5f55\u5165\u8d44\u4ea7\u5e93)\" -ForegroundColor Green\n        } else {\n            Write-Host \"&#91;$Computer] \u8d44\u4ea7\u5e93\u5df2\u5b58\u5728\u8bb0\u5f55\uff0c\u65e0\u9700\u91cd\u590d\u5f55\u5165\u3002\" -ForegroundColor Gray\n        }\n    } else {\n        Write-Host \"&#91;$Computer] \u5728\u7ebf\uff0c\u4f46\u672a\u80fd\u8fdc\u7a0b\u83b7\u53d6\u5230\u6d3b\u52a8\u7f51\u5361 MAC \u5730\u5740\u3002\" -ForegroundColor Yellow\n    }\n}\n\nWrite-Host \"`n==================================================\" -ForegroundColor Cyan\nWrite-Host \"  \u8d44\u4ea7\u91c7\u96c6\u5b8c\u6210\uff01\u6570\u636e\u5df2\u5b89\u5168\u7f13\u5b58\u5728\u672c\u5730 wol_database.csv\" -ForegroundColor Green\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nRead-Host \"\u6309\u4efb\u610f\u952e\u9000\u51fa...\"\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\u6b65\uff1a\u3010\u65e0\u8111\u5524\u9192\u3011\u8bfb\u53d6\u8ba1\u7b97\u673a\u540d\u81ea\u52a8\u5339\u914d\u5524\u9192\uff08PowerShell \u7248\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u672a\u6765\u67d0\u4e9b\u8ba1\u7b97\u673a\u8fdb\u5165\u7761\u7720\u6216\u5173\u673a\u72b6\u6001\u65f6\uff0c\u8bf7\u53f3\u952e\u8fd0\u884c\u4ee5\u4e0b\u811a\u672c\uff0c\u4fdd\u5b58\u4e3a <strong><code>0_Batch_WakeByName.ps1<\/code><\/strong>\u3002\u5b83\u4f1a\u81ea\u52a8\u8bfb\u53d6 <code>list1.txt<\/code>\uff0c\u81ea\u52a8\u53bb\u4e0a\u4e00\u6b65\u751f\u6210\u7684\u8d44\u4ea7\u5e93\u91cc\u5339\u914d MAC \u5e76\u8f70\u51fa\u5524\u9192\u5c01\u5305\uff0c\u968f\u540e<strong>\u81ea\u52a8\u751f\u6210 <code>list2.txt<\/code> \u5408\u683c\u5347\u7ea7\u540d\u5355<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># ==================================================\n# \u4fdd\u5b58\u4e3a: 0_Batch_WakeByName.ps1 (\u53f3\u952e\u4f7f\u7528 PowerShell \u8fd0\u884c)\n# \u4f5c\u7528: \u8bfb\u53d6 list1.txt\uff0c\u4ece\u672c\u5730\u8d44\u4ea7\u5e93\u5339\u914d MAC \u5e76\u4e00\u952e\u5524\u9192\u7b5b\u9009\uff0c\u8f93\u51fa list2.txt\n# ==================================================\nclear\nScriptDir = Split-Path -Parent MyInvocation.MyCommand.Definition\nSet-Location \\$ScriptDir\n\nList1Path = \"ScriptDir\\list1.txt\"\nList2Path = \"ScriptDir\\list2.txt\"\nDbPath = \"ScriptDir\\wol_database.csv\"\n\nif (!(Test-Path List1Path) -or !(Test-Path DbPath)) {\n    Write-Error \"\u7f3a\u5c11 list1.txt \u6216\u672c\u5730\u8d44\u4ea7\u5e93 wol_database.csv\uff0c\u8bf7\u5148\u68c0\u67e5\uff01\"\n    Read-Host \"\u6309\u56de\u8f66\u9000\u51fa...\"; exit\n}\n\n\\$ComputerList = Get-Content List1Path | Where-Object _.Trim() -ne \"\" }\nDatabase = Import-Csv -Path DbPath -Encoding UTF8\n\nfunction Send-WOLPacket (&#91;string]\\$MacAddress) {\n    cleanMac = MacAddress.Replace(\"-\",\"\").Replace(\":\",\"\")\n    if (\\$cleanMac.Length -ne 12) { return \\(false }\\)packet = &#91;byte&#91;]](,0xFF * 6)\n    for (\\$i = 0; i -lt 16; i++) {\n        for (\\$j = 0; j -lt 12; j += 2) { \\(packet += &#91;Convert]::ToByte(\\)cleanMac.Substring(\\(j, 2), 16) }     }\\)UDPClient = New-Object System.Net.Sockets.UdpClient\n    \\$UDPClient.Connect((&#91;System.Net.IPAddress]::Broadcast), 9)\n    &#91;void]UDPClient.Send(packet, \\(packet.Length)\\)UDPClient.Close()\n    return \\$true\n}\n\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \"    \u81ea\u52a8\u5316\u6d41\u6c34\u7ebf &#91;\u524d\u7f6e\u5524\u9192]: \u8d44\u4ea7\u5e93\u81ea\u9002\u5e94\u65e0\u8111\u5524\u9192   \" -ForegroundColor Cyan\nWrite-Host \"==================================================\" -ForegroundColor Cyan\n\n# --- \u73af\u8282 1: \u8d44\u4ea7\u5e93\u68c0\u7d22\u5e76\u7fa4\u53d1\u5c01\u5305 ---\n\\$WakeCount = 0\nforeach (Computer in ComputerList) {\n    Computer = Computer.Trim()\n    Record = Database | Where-Object { \\(_.ComputerName -eq\\)Computer } | Select-Object -First 1\n    \n    if (Record -and Record.MAC) {\n        Mac = Record.MAC\n        SendStatus = Send-WOLPacket -MacAddress Mac\n        if (\\$SendStatus) {\n            Write-Host \"\u5df2\u901a\u8fc7\u8d44\u4ea7\u5e93\u5339\u914d\u5e76\u5524\u9192: &#91;\\(Computer] -> (\\)Mac)\" -ForegroundColor Green\n            \\$WakeCount++\n        }\n    } else {\n        Write-Host \"\u65e0\u6cd5\u5524\u9192 &#91;\\$Computer]: \u672c\u5730\u8d44\u4ea7\u5e93\u4e2d\u672a\u627e\u5230\u5176 MAC \u8bb0\u5f55\uff0c\u8bf7\u5148\u5728\u5f00\u673a\u65f6\u8fd0\u884c\u91c7\u96c6\u811a\u672c\uff01\" -ForegroundColor Red\n    }\n}\n\nWrite-Host \"\u5524\u9192\u5c01\u5305\u5df2\u5168\u90e8\u8f70\u51fa\uff01\" -ForegroundColor Green\nWrite-Host \"--------------------------------------------------\"\nWrite-Host \"\u6b63\u5728\u7b49\u5f85 40 \u79d2\uff0c\u7559\u7ed9\u76ee\u6807\u8ba1\u7b97\u673a\u4e3b\u677f\u7f51\u7edc\u548c\u7cfb\u7edf\u542f\u52a8...\" -ForegroundColor Yellow\nfor (\\$seconds = 40; seconds -gt 0; seconds--) {\n    Write-Progress -Activity \"\u7b49\u5f85\u76ee\u6807\u673a\u5524\u9192\u4e0a\u7ebf\u4e2d...\" -Status \"seconds \u79d2\u540e\u81ea\u52a8\u5f00\u59cb\u8fdb\u884c Ping \u4e0e\u9632\u706b\u5899\u626b\u63cf...\" -PercentComplete ((seconds\/40)*100)\n    Start-Sleep -Seconds 1\n}\nWrite-Progress -Activity \"\u7b49\u5f85\u76ee\u6807\u673a\u5524\u9192\u4e0a\u7ebf\u4e2d...\" -Completed\n\n# --- \u73af\u8282 2: \u81ea\u52a8\u626b\u63cf\uff0c\u751f\u6210\u6d41\u6c34\u7ebf list2.txt ---\nWrite-Host \"\u6b63\u5728\u626b\u63cf\u54ea\u4e9b\u673a\u5668\u5df2\u6210\u529f\u82cf\u9192\u5e76\u89e3\u5c01\u9632\u706b\u5899\uff08\u6b63\u5728\u751f\u6210 list2.txt\uff09...\" -ForegroundColor Yellow\n\nif (Test-Path $List2Path) { Remove-Item $List2Path -Force }\n$ReadyCount = 0\n\nforeach ($Computer in $ComputerList) {\n    $Computer = $Computer.Trim()\n    $PingStatus = Test-Connection -ComputerName $Computer -Count 1 -Quiet -ErrorAction SilentlyContinue\n    \n    if ($PingStatus) {\n        $PortStatus = Test-NetConnection -ComputerName $Computer -Port 445 -WarningAction SilentlyContinue\n        if ($PortStatus.TcpTestSucceeded) {\n            Add-Content -Path $List2Path -Value $Computer\n            Write-Host \"   &#91;$Computer] \u5df2\u4e0a\u7ebf\u4e14\u9632\u706b\u5899\u5c31\u7eea\uff01\u5df2\u52a0\u5165 list2.txt\" -ForegroundColor Green\n            $ReadyCount++\n        } else {\n            Write-Host \"   &#91;$Computer] \u5df2\u4e0a\u7ebf\uff0c\u4f46 445 \u7aef\u53e3\u88ab\u9632\u706b\u5899\u62e6\u622a\uff01\u65e0\u6cd5\u52a0\u5165 list2.txt\" -ForegroundColor Yellow\n        }\n    } else {\n        Write-Host \"   &#91;$Computer] \u4f9d\u65e7\u5904\u4e8e\u7761\u7720\u6216\u5173\u673a\u72b6\u6001\u3002\" -ForegroundColor Red\n    }\n}\n\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \" \u5524\u9192\u4e0e\u4f18\u8d28\u540d\u5355\u7b5b\u9009\u5b8c\u6210\uff01\u5171\u8ba1 &#91; \\$ReadyCount ] \u53f0\u53ef\u76f4\u63a5\u5347\u7ea7\u3002\" -ForegroundColor Green\nWrite-Host \" \u4e0b\u4e00\u6b65\uff1a\u8bf7\u53cc\u51fb 1_Auto_Upgrade.bat \u542f\u52a8\u6d41\u6c34\u7ebf\u5347\u7ea7\u3002\" -ForegroundColor Yellow\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nRead-Host \"\u6309\u4efb\u610f\u952e\u9000\u51fa...\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u66f4\u65b0\u6307\u4ee4\u4e0b\u53d1\u540e\u5982\u4f55\u624d\u80fd\u67e5\u770b\u66f4\u65b0\u8fdb\u5ea6\u662f\u5426\u66f4\u65b0\u5b8c\u6210\uff1f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7531\u4e8e\u6211\u4eec\u4e4b\u524d\u5bf9 <code>local_upgrade_final.bat<\/code> \u811a\u672c\u8fdb\u884c\u4e86<strong>\u6781\u9ad8\u7ea7\u7684\u4f01\u4e1a\u7ea7\u4f18\u5316<\/strong>\uff08\u52a0\u5165\u4e86 <code>\/noreboot<\/code> \u53c2\u6570\uff0c\u4e14\u53bb\u9664\u4e86 <code>\/quiet<\/code> \u6a21\u5f0f\u4e0b\u53ef\u80fd\u4ea7\u751f\u7684\u786c\u5f39\u7a97\u9650\u5236\uff09\uff0cWindows \u5b89\u88c5\u7a0b\u5e8f\u5728\u5b8c\u6210\u7b2c\u4e00\u9636\u6bb5\u7684\u6240\u6709\u6587\u4ef6\u89e3\u538b\u3001\u914d\u7f6e\u8fc1\u79fb\u548c\u6ce8\u5165\u540e\uff0c\u4f1a<strong>\u5b89\u5168\u6302\u8d77\uff0c\u7edd\u5bf9\u4e0d\u4f1a\u81ea\u52a8\u91cd\u542f<\/strong>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u63a7\u5236\u7aef\u8ba1\u7b97\u673a\u4e0a\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7<strong>\u8fdc\u7a0b\u8bfb\u53d6\u76ee\u6807\u673a\u4e0a\u7684\u5173\u952e\u5b89\u88c5\u65e5\u5fd7<\/strong>\uff0c\u6765 100% \u786e\u8ba4\u5b83\u662f\u5426\u5df2\u7ecf\u201c\u66f4\u65b0\u51c6\u5907\u5c31\u7eea\uff0c\u6b63\u5728\u9759\u9ed8\u7b49\u5f85\u624b\u52a8\u91cd\u542f\u201d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u662f\u4e3a\u4f60\u7f16\u5199\u7684<strong>\u63a7\u5236\u7aef\u4e13\u7528\u5b9e\u65f6\u8fdb\u5ea6\u4e0e\u5b8c\u5de5\u72b6\u6001\u68c0\u67e5\u811a\u672c<\/strong>\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> \u63a7\u5236\u7aef\u72b6\u6001\u96f7\u8fbe\uff1a<code>2_Check_Progress.ps1<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u5728\u4f60\u7684<strong>\u63a7\u5236\u7aef\u8ba1\u7b97\u673a<\/strong>\u4e0a\uff0c\u5c06\u4ee5\u4e0b\u4ee3\u7801\u4fdd\u5b58\u4e3a <strong><code>2_Check_Progress.ps1<\/code><\/strong>\uff08PowerShell \u811a\u672c\uff09\u3002\u5b83\u53ef\u4ee5\u8fdc\u7a0b\u8bfb\u53d6\u4f60\u5728 <code>list2.txt<\/code> \u4e2d\u4e0b\u53d1\u7684\u673a\u5668\uff0c\u5e76\u7cbe\u51c6\u5224\u5b9a\u5176\u5f53\u524d\u5361\u5728\u54ea\u4e2a\u5347\u7ea7\u9636\u6bb5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># ==================================================\n# \u4fdd\u5b58\u4e3a: 2_Check_Progress.ps1 (\u53f3\u952e\u4f7f\u7528 PowerShell \u8fd0\u884c)\n# \u4f5c\u7528: \u6279\u91cf\u8fdc\u7a0b\u68c0\u67e5\u76ee\u6807\u673a\u7684 Win11 \u9759\u9ed8\u66f4\u65b0\u771f\u5b9e\u5b8c\u6210\u8fdb\u5ea6\u4e0e\u72b6\u6001\n# ==================================================\nclear\nScriptDir = Split-Path -Parent MyInvocation.MyCommand.Definition\nSet-Location \\$ScriptDir\n\nList2Path = \"ScriptDir\\list2.txt\"\n\nif (!(Test-Path \\$List2Path)) {\n    Write-Error \"\u627e\u4e0d\u5230\u5c31\u7eea\u5217\u8868 list2.txt\uff0c\u8bf7\u786e\u4fdd\u4e4b\u524d\u8fd0\u884c\u8fc7\u90e8\u7f72\u811a\u672c\uff01\"\n    Read-Host \"\u6309\u56de\u8f66\u9000\u51fa...\"; exit\n}\n\n\\$ComputerList = Get-Content List2Path | Where-Object _.Trim() -ne \"\" }\n\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \"     Windows 11 \u5c40\u57df\u7f51\u5347\u7ea7\u6d41\u6c34\u7ebf\u8fdb\u5ea6\u4e0e\u5b8c\u5de5\u68c0\u67e5\u5668     \" -ForegroundColor Cyan\nWrite-Host \"==================================================\" -ForegroundColor Cyan\nWrite-Host \"\u63d0\u793a: \u5f53\u72b6\u6001\u663e\u793a &#91;\ud83c\udf89 \u51c6\u5907\u5c31\u7eea] \u65f6\uff0c\u5373\u53ef\u5b89\u5168\u4e0b\u53d1\u624b\u52a8\u91cd\u542f\u547d\u4ee4\u3002`n\"\n\n&#91;string]::Format(\"{0,-15} | {1,-10} | {2,-15} | {3,-10}\", \"\u8ba1\u7b97\u673a\u540d\/IP\", \"\u8fdb\u7a0b\u72b6\u6001\", \"\u5df2\u7f13\u5b58\u6587\u4ef6\u4f53\u79ef\", \"\u5f53\u524d\u5347\u7ea7\u6240\u5904\u72b6\u6001\") | Write-Host -ForegroundColor White\nWrite-Host (\"-\" * 75)\n\nforeach ($Computer in $ComputerList) {\n    $Computer = $Computer.Trim()\n    \n    # 1. \u68c0\u67e5\u7f51\u7edc\u8fde\u901a\u6027\n    $Ping = Test-Connection -ComputerName $Computer -Count 1 -Quiet -ErrorAction SilentlyContinue\n    if (!$Ping) {\n        &#91;string]::Format(\"{0,-15} | {1,-10} | {2,-15} | {3,-10}\", $Computer, \"\u274c \u79bb\u7ebf\", \" -- \", \"\u673a\u5668\u65ad\u7f51\u6216\u5df2\u81ea\u884c\u91cd\u542f\") | Write-Host -ForegroundColor Red\n        continue\n    }\n\n    # 2. \u68c0\u67e5\u540e\u53f0\u6838\u5fc3\u8fdb\u7a0b\u662f\u5426\u5728\u8fd0\u884c\n    $Process = Get-CimInstance -ComputerName $Computer -ClassName Win32_Process -ErrorAction SilentlyContinue | \n               Where-Object { $_.Name -eq \"setup.exe\" -or $_.Name -eq \"setupprep.exe\" }\n    \n    $ProcStatus = if ($Process) { \"\u26a1 \u5954\u8dd1\u4e2d\" } else { \"\ud83d\udca4 \u5df2\u9000\u51fa\" }\n\n    # 3. \u7edf\u8ba1\u7f13\u5b58\u6587\u4ef6\u5939\u4f53\u79ef\n    $Size = Get-ChildItem \"\\\\$Computer\\c$\\`\\$WINDOWS.~BT\" -Recurse -File -ErrorAction SilentlyContinue | \n            Measure-Object -Property Length -Sum | Select-Object -ExpandProperty Sum\n    \\$SizeGB = if (\\(Size) { &#91;math]::Round(\\)Size \/ 1GB, 2) } else { 0 }\n\n    # 4. \u7ec8\u6781\u72b6\u6001\u5224\u5b9a\uff1a\u8bfb\u53d6\u5fae\u8f6f\u5b98\u65b9\u83ab\u624e\u7279\u65e5\u5fd7 (setupact.log) \u7684\u6700\u540e\u51e0\u884c\n    \\(LogPath = \"\\$Computer\\c\\)\\`$WINDOWS.~BT\\Sources\\Panther\\setupact.log\"\n    $StatusDescription = \"\u6b63\u5728\u542f\u52a8\u521d\u59cb\u5316\u68c0\u67e5...\"\n    $FinalColor = \"Yellow\"\n\n    if (Test-Path $LogPath) {\n        try {\n            # \u8fdc\u7a0b\u8bfb\u53d6\u6700\u540e 30 \u884c\u65e5\u5fd7\u4ee5\u6355\u83b7\u5173\u952e\u7ed3\u8bed\n            $LogTail = Get-Content -Path $LogPath -Tail 30 -ErrorAction SilentlyContinue\n            \n            if ($LogTail -match \"Requesting reboot\" -or $LogTail -match \"Setup has completed the pre-installation phase\" -or ($SizeGB -gt 4.5 -and !$Process)) {\n                $StatusDescription = \"\ud83c\udf89 \u51c6\u5907\u5c31\u7eea(\u7b49\u5f85\u91cd\u542f)\"\n                $FinalColor = \"Green\"\n            } elseif ($LogTail -match \"FatalError\" -or $LogTail -match \"failed\") {\n                $StatusDescription = \"\u274c \u5347\u7ea7\u9047\u5230\u786c\u9519\u8bef\u5361\u6b7b\"\n                $FinalColor = \"Red\"\n            } elseif ($SizeGB -gt 0) {\n                $StatusDescription = \"\u23f3 \u6b63\u5728\u75af\u72c2\u89e3\u538b\u4e0e\u590d\u5236\u6587\u4ef6...\"\n                $FinalColor = \"Cyan\"\n            }\n        } catch {\n            $StatusDescription = \"\u65e0\u6cd5\u8bfb\u53d6\u65e5\u5fd7\uff0c\u4f46\u6b63\u5728\u590d\u5236...\"\n        }\n    } else {\n        if ($Process) {\n            $StatusDescription = \"\u5b89\u88c5\u542f\u52a8\u4e2d\uff0c\u6b63\u5728\u521b\u5efa\u4e34\u65f6\u76ee\u5f55...\"\n        } else {\n            $StatusDescription = \"\u274c \u811a\u672c\u5df2\u88ab\u7ec8\u6b62\u6216\u672a\u771f\u6b63\u6210\u529f\u62c9\u8d77\"\n            $FinalColor = \"Red\"\n        }\n    }\n\n    # \u6253\u5370\u5355\u53f0\u7ed3\u679c\n    &#91;string]::Format(\"{0,-15} | {1,-10} | {2,-15} | {3,-10}\", $Computer, $ProcStatus, \"$SizeGB GB\", $StatusDescription) | Write-Host -ForegroundColor $FinalColor\n}\n\nWrite-Host \"`n==================================================\" -ForegroundColor Cyan\nRead-Host \"\u6309\u4efb\u610f\u952e\u9000\u51fa...\"\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcca \u5982\u4f55\u901a\u8fc7\u5c4f\u5e55\u4e0a\u7684\u4e09\u7ef4\u6307\u6807\u7cbe\u51c6\u5224\u65ad\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u4f60\u8fd0\u884c\u6b64\u96f7\u8fbe\u811a\u672c\u540e\uff0c\u4f60\u4f1a\u6e05\u6670\u770b\u5230\u4e09\u4e2a\u6570\u636e\u7ef4\u5ea6\u7684\u4ea4\u53c9\u53cd\u9988\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>\u8fdb\u7a0b\u72b6\u6001<\/th><th>\u5df2\u7f13\u5b58\u6587\u4ef6\u4f53\u79ef<\/th><th>\u5c4f\u5e55\u663e\u793a\u72b6\u6001<\/th><th>\ud83d\udee0\ufe0f \u8fd0\u7ef4\u52a8\u4f5c \/ \u5b9e\u9645\u8fdb\u5ea6<\/th><\/tr><tr><td><strong>\u26a1 \u5954\u8dd1\u4e2d<\/strong><\/td><td>\u4ece\u51e0\u767e MB \u6301\u7eed\u98d9\u5347\u81f3 <code>4GB~8GB<\/code><\/td><td><code>\u23f3 \u6b63\u5728\u75af\u72c2\u89e3\u538b\u4e0e\u590d\u5236\u6587\u4ef6...<\/code><\/td><td>\u5b89\u88c5\u7a0b\u5e8f\u6b63\u5728\u5168\u901f\u8fd0\u8f6c\uff0c\u7528\u6237\u6b63\u5728\u5e73\u7a33\u529e\u516c\uff0c<strong>\u65e0\u9700\u5e72\u9884\uff0c\u7ee7\u7eed\u7b49\u5f85<\/strong>\u3002<\/td><\/tr><tr><td><strong>\ud83d\udca4 \u5df2\u9000\u51fa<\/strong><\/td><td>\u7a33\u5b9a\u5728 <code>5GB~10GB<\/code> \u4e0d\u518d\u589e\u957f<\/td><td><code>\ud83c\udf89 \u51c6\u5907\u5c31\u7eea(\u7b49\u5f85\u91cd\u542f)<\/code><\/td><td><strong>\u5927\u529f\u544a\u6210\uff01<\/strong> \u610f\u5473\u7740\u7b2c\u4e00\u9636\u6bb5\uff08\u9759\u9ed8\u704c\u5165\uff09\u5df2 100% \u5b8c\u5de5\u3002\u8fdb\u7a0b\u5df2\u529f\u6210\u8eab\u9000\u5e76\u5b89\u5168\u9000\u51fa\uff0c<strong>\u76ee\u524d\u6b63\u5904\u4e8e\u5b8c\u5168\u5b89\u5168\u72b6\u6001\uff0c\u5728\u7b49\u5f85\u4f60\u4e0b\u53d1\u91cd\u542f\u547d\u4ee4<\/strong>\u3002<\/td><\/tr><tr><td><strong>\ud83d\udca4 \u5df2\u9000\u51fa<\/strong><\/td><td><code>0 GB<\/code> \u6216\u51e0 MB<\/td><td><code>\u274c \u811a\u672c\u5df2\u88ab\u7ec8\u6b62\u6216\u672a\u771f\u6b63\u6210\u529f\u62c9\u8d77<\/code><\/td><td>\u8bf4\u660e\u4e0b\u53d1\u5931\u8d25\uff0c\u6216\u76ee\u6807\u673a\u73af\u5883\u5b58\u5728\u81f4\u547d\u786c\u4ef6\u6216\u7cfb\u7edf\u62a5\u9519\uff0c\u53ef\u5728 <code>list3.txt<\/code> \u4e2d\u6392\u67e5\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfc1 \u4e0b\u4e00\u6b65\uff1a\u5982\u4f55\u6279\u91cf\u4e00\u952e\u6536\u5c3e\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u8fd9\u6279\u6267\u884c\u673a\u5728\u5c4f\u5e55\u4e0a\u9646\u7eed\u6cdb\u8d77 <strong><code>\ud83d\udfe2 \ud83c\udf89 \u51c6\u5907\u5c31\u7eea(\u7b49\u5f85\u91cd\u542f)<\/code><\/strong> \u7684\u7eff\u8272\u72b6\u6001\u65f6\uff0c\u8fd9\u8bf4\u660e\u4f60\u53ef\u4ee5\u81ea\u7531\u9009\u62e9\u5728<strong>\u4e2d\u5348\u5348\u4f11<\/strong>\u3001\u6216\u8005<strong>\u534a\u591c\u4e0b\u73ed\u540e<\/strong>\uff0c\u7edf\u4e00\u7ed9\u8fd9\u6279\u673a\u5668\u53d1\u9001\u4e00\u6761\u201c\u5b9a\u65f6\/\u7acb\u5373\u91cd\u542f\u201d\u6307\u4ee4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u673a\u5668\u4e00\u65e6\u89e6\u53d1\u91cd\u542f\uff0c\u7531\u4e8e\u6240\u6709\u8865\u4e01\u548c\u65e0\u4eba\u503c\u5b88\u914d\u7f6e\u5728\u521a\u624d\u5df2\u7ecf\u767e\u5206\u4e4b\u767e\u6ce8\u5165\u5230\u4e86 C \u76d8\uff0c\u5b83\u4f1a\u81ea\u52a8\u8fdb\u5165\u84dd\u8272\u7684 Win11 \u8fdb\u5ea6\u8dd1\u5708\uff0c\u5927\u7ea6 15 \u5206\u949f\u540e\u81ea\u52a8\u8de8\u5165 Win11 \u684c\u9762\uff0c\u4e14\u539f\u6709\u7684\u4e2a\u4eba\u8f6f\u4ef6\u3001\u914d\u7f6e\u5b8c\u597d\u635f\u8017\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u6b64\u524d\u5355\u673a\u4f7f\u7528sc\u6307\u4ee4\u8fdc\u7a0b\u66f4\u65b0Win11\u5927\u7248\u672c\u7684\u6280\u672f\u4e0a\uff0c\u5f15\u5165\u8ba1\u7b97\u673a\u5217\u8868\u6267\u884c\u81ea\u52a8\u626b\u63cf\u3001\u81ea\u52a8\u63a8\u9001\u66f4\u65b0\u5e76\u4fdd\u5b58\u5931\u8d25\u5217\u8868<br \/><a class=\"moretag\" href=\"https:\/\/www.x4s.cn\/?p=1223\">+ Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":1151,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/1223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1223"}],"version-history":[{"count":6,"href":"https:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/1223\/revisions"}],"predecessor-version":[{"id":1235,"href":"https:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/1223\/revisions\/1235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/media\/1151"}],"wp:attachment":[{"href":"https:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}