hmLoadTopic({
hmKeywords:"執行命令",
hmTitle:"執行命令",
hmDescription:"[執行命令] 工作可用於在用戶端上執行特定命令列指示。管理員可以指定要執行的命令列輸入。   為了增強安全性並降低未經授權的遠端動作風險，對執行命令工作的存取權會有所限制。建立新工作或執行現有的執行命令工作時，您必須啟用雙因素驗證 (2FA) 才能讓執行命令工作變成可用。 選取下列其中一個選項以建立新的用戶端工資握： 按一下 [工作] > [新增]",
hmPrevLink:"client_tasks_rd_sensor_database_reset.html",
hmNextLink:"client_tasks_upgrade_components.html",
hmParentLink:"client_tasks.html",
hmBreadCrumbs:"<a href=\"using.html\">使用 ESET PROTECT On-Prem<\/a> &gt; <a href=\"working_with_era.html\">ESET PROTECT On-Prem 主功能表<\/a> &gt; <a href=\"admin_ct.html\">工作<\/a> &gt; <a href=\"client_tasks.html\">用戶端工作<\/a>",
hmTitlePath:"使用 ESET PROTECT On-Prem > ESET PROTECT On-Prem 主功能表 > 工作 > 用戶端工作 > 執行命令",
hmHeader:"<h1 class=\"p_Heading1\"><span class=\"f_Heading1\">執行命令<\/span><\/h1>\n\r",
hmBody:"<p class=\"p_Normal\"><span class=\"f_UI\">[執行命令]<\/span> 工作可用於在用戶端上執行特定命令列指示。管理員可以指定要執行的命令列輸入。<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_important\" >\n\r<tr class=\"Table_important\">\n\r<td class=\"Table_important\" style=\"width:4px; background-color:#E9A514;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_important\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"重要\" title=\"重要\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/important.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_important\"><p class=\"p_Normal\">為了增強安全性並降低未經授權的遠端動作風險，對執行命令工作的存取權會有所限制。建立新工作或執行現有的執行命令工作時，您必須<a href=\"admin_ar_two_factor_authentification.html\" class=\"topiclink\">啟用雙因素驗證<\/a> (2FA) 才能讓執行命令工作變成可用。<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\">選取下列其中一個選項以建立新的用戶端工資握：<\/p>\n\r<p class=\"p_NormalList\" style=\"text-indent: 0; page-break-inside: avoid; page-break-after: avoid; padding-left: 13px; margin-left: 19px;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_NormalList\">按一下 <\/span><span class=\"f_UI\">[工作]<\/span><span class=\"f_NormalList\"> &gt; <\/span><span class=\"f_UI\">[新增]<\/span><span class=\"f_NormalList\"> &gt; <img alt=\"新增\" title=\"新增\" width=\"16\" height=\"16\" style=\"margin:0;width:16px;height:16px;border:none\" src=\".\/images\/add_new_default.png\"\/><\/span><span class=\"f_UI\">[用戶端工作]<\/span><span class=\"f_NormalList\">。<\/span><\/p>\n\r<p class=\"p_NormalList\" style=\"text-indent: 0; page-break-inside: avoid; page-break-after: avoid; padding-left: 13px; margin-left: 19px;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_NormalList\">按一下 <\/span><span class=\"f_UI\">[工作]<\/span><span class=\"f_NormalList\"> &gt; 選取所需的工作類型，然後按一下 <\/span><span class=\"f_UI\">[新增]<\/span><span class=\"f_NormalList\"> &gt; <img alt=\"新增\" title=\"新增\" width=\"16\" height=\"16\" style=\"margin:0;width:16px;height:16px;border:none\" src=\".\/images\/add_new_default.png\"\/><\/span><span class=\"f_UI\"> [用戶端工作]<\/span><span class=\"f_NormalList\">。<\/span><\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 32px; margin-left: 0;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span>按一下 <span class=\"f_UI\">[電腦]<\/span> 中的目標裝置，然後選取 <img alt=\"工作\" title=\"工作\" width=\"16\" height=\"16\" style=\"margin:0;width:16px;height:16px;border:none\" src=\".\/images\/icon_tasks.png\"\/> <span class=\"f_UI\">[工作]<\/span> &gt; <img alt=\"新增\" title=\"新增\" width=\"16\" height=\"16\" style=\"margin:0;width:16px;height:16px;border:none\" src=\".\/images\/add_new_default.png\"\/><span class=\"f_UI\"> [新工作]<\/span>。<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_important\" >\n\r<tr class=\"Table_important\">\n\r<td class=\"Table_important\" style=\"width:4px; background-color:#E9A514;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_important\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"重要\" title=\"重要\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/important.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_important\"><p class=\"p_Normal\">不需要存取桌面環境即可執行命令。因此，有應用程式 GUI 需求的命令可能會失敗。<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\">您可以使用 <span class=\"f_CodeHighlighted\">ecmd<\/span> 命令及 [執行命令] 工作。如需相關資訊，請造訪下列<a href=\"https:\/\/support.eset.com\/kb7277\/\" target=\"_blank\" onclick=\"return HMTrackTopiclink(this);\" class=\"weblink\">此知識庫文章<\/a>。<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_small\" style=\"width:100%;\">\n\r<thead>\n\r<tr class=\"Table_small\">\n\r<th class=\"Table_small\" style=\"width:146px;\" scope=\"col\"><p class=\"p_Head_row\"><span class=\"f_Head_row\">作業系統<\/span><\/p>\n\r<\/th>\n\r<th class=\"Table_small\" style=\"width:204px;\" scope=\"col\"><p class=\"p_Head_row\"><span class=\"f_Head_row\">命令將會以使用者執行<\/span><\/p>\n\r<\/th>\n\r<th class=\"Table_small\" style=\"width:216px;\" scope=\"col\"><p class=\"p_Head_row\"><span class=\"f_Head_row\">預設工作目錄<\/span><\/p>\n\r<\/th>\n\r<th class=\"Table_small\" style=\"width:439px;\" scope=\"col\"><p class=\"p_Head_row\"><span class=\"f_Head_row\">可存取的網路位置<\/span><\/p>\n\r<\/th>\n\r<th class=\"Table_small\" style=\"width:266px;\" scope=\"col\"><p class=\"p_Head_row\"><span class=\"f_Head_row\">命令將會執行的位置<\/span><\/p>\n\r<\/th>\n\r<\/tr>\n\r<\/thead>\n\r<tbody>\n\r<tr class=\"Table_small\">\n\r<td class=\"Table_small\" style=\"width:146px;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">Windows<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:204px;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_Path\">Local System<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:216px;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_Path\">C:\\Windows\\Temp<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:439px;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">僅限目前網域內和使用者本機系統可用的位置<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:266px;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">命令提示字元 (<\/span><span class=\"f_CodeHighlighted\">cmd.exe<\/span><span class=\"f_NormalTable\">)<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"Table_small\">\n\r<td class=\"Table_small\" style=\"width:146px; background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">Linux 或 macOS<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:204px; background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_Path\">root<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:216px; background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_Path\">\/tmp<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:439px; background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">僅在已裝載的位置和根目錄使用者可用時<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small\" style=\"width:266px; background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">主控台<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/tbody>\n\r<\/table>\n\r<\/div>\n\r<h2 class=\"p_Heading2\" style=\"page-break-after: avoid;\"><span class=\"f_Heading2\">基本<\/span><\/h2>\n\r<p class=\"p_Normal\">在 <span class=\"f_UI\">[基本]<\/span> 區段中，輸入有關工作的基本資訊，例如 <span class=\"f_UI\">[名稱] 及 [說明] (選用)<\/span>。 按一下 <span class=\"f_UI\">[選取標籤]<\/span> 以<a href=\"tags.html#assign_tags\" class=\"topiclink\">指派標籤<\/a>。<br \/>\n\r在 <span class=\"f_UI\">[工作]<\/span> 下拉式功能表中，選取您要建立和配置的工作類型。如果您先選取了特定工作類型，然後才建立新工作，則會依據您之前的選擇來預先選取 <span class=\"f_UI\">[工作]<\/span>。<span class=\"f_UI\">[工作]<\/span> (請參閱<a href=\"admin_ct.html\" class=\"topiclink\">所有工作清單<\/a>) 可定義工作的設定與行為。<\/p>\n\r<h2 class=\"p_Heading2\" style=\"page-break-after: avoid;\"><span class=\"f_Heading2\">設定<\/span><\/h2>\n\r<p class=\"p_NormalList\" style=\"text-indent: 0; page-break-inside: avoid; page-break-after: avoid; padding-left: 13px; margin-left: 19px;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_UI\">要執行的命令列<\/span><span class=\"f_NormalList\"> - 輸入您要在用戶端上執行的命令列。<\/span><\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 32px; margin-left: 0;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_UI\">工作目錄<\/span> - 輸入執行上述命令列所在的目錄。<span class=\"f_UI\">工作目錄<\/span>限制為 1,024 個字元。<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_important\" >\n\r<tr class=\"Table_important\">\n\r<td class=\"Table_important\" style=\"width:4px; background-color:#E9A514;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_important\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"重要\" title=\"重要\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/important.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_important\"><p class=\"p_Normal\">您可以輸入多行命令。命令長度限制上限：<\/p>\n\r<p class=\"p_NormalList\" style=\"text-indent: 0; page-break-inside: avoid; page-break-after: avoid; padding-left: 13px; margin-left: 19px;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_NormalList\">Web Console 可以處理最多 65,536 個字元。如果您複製-貼上較長的命令，可能會無訊息地切斷結尾。<\/span><\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 32px; margin-left: 0;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span>Linux 與 macOS 可處理命令的完整長度。Windows 的<a href=\"https:\/\/docs.microsoft.com\/en-us\/troubleshoot\/windows-client\/shell-experience\/command-line-string-limitation\" target=\"_blank\" onclick=\"return HMTrackTopiclink(this);\" class=\"weblink\">限制<\/a>上限是 8,191 個字元。<\/p><\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_example\" >\n\r<tr class=\"Table_example\">\n\r<td class=\"Table_example\" style=\"width:4px; background-color:#77BB1A;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_example\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"範例\" title=\"範例\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/example.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_example\"><p class=\"p_Normal\">如要執行位於 <span class=\"f_Path\">C:\\Users\\user\\script.bat<\/span> 上的用戶端的本機指令碼，請執行下列步驟：<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">1.<\/span>建立新的用戶端工作，然後選取 <span class=\"f_UI\">[執行命令]<\/span>。<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">2.<\/span>在 <span class=\"f_UI\">[設定]<\/span> 區段中，輸入：<\/p>\n\r<p class=\"p_NormalList\" style=\"text-indent: 0; page-break-inside: avoid; page-break-after: avoid; padding-left: 13px; margin-left: 19px;\"><span class=\"f_CodeHighlighted\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_UI\">要執行的命令列<\/span><span class=\"f_NormalList\">：<\/span><span class=\"f_CodeHighlighted\">呼叫 script.bat<\/span><\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 32px; margin-left: 0;\"><span class=\"f_CodeHighlighted\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_UI\">工作目錄<\/span>：<span class=\"f_Path\">C:\\Users\\user<\/span><\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">3.<\/span>按一下 <span class=\"f_UI\">[完成]<\/span>，建立觸發和選擇目標用戶端。<\/p>\n\r<p class=\"p_Normal\">若要執行多行命令列以遠端重新啟動 Windows 伺服器 (將 <span class=\"f_CodeHighlighted\">service_name<\/span> 取代為伺服器名稱，例如，對於 Windows Update 服務使用 <span class=\"f_CodeHighlighted\">wuauserv<\/span>)：<\/p>\n\r<p class=\"p_CodeHighlighted\" style=\"page-break-inside: avoid; margin: 0 0 0 13px;\"><span class=\"f_CodeHighlighted\">net&nbsp;stop&nbsp;service_name<\/span><\/p>\n\r<p class=\"p_CodeHighlighted\" style=\"page-break-inside: avoid; margin: 0 0 0 13px;\"><span class=\"f_CodeHighlighted\">net&nbsp;start&nbsp;service_name<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<h2 class=\"p_Heading2\" style=\"page-break-after: avoid;\"><span class=\"f_Heading2\">摘要<\/span><\/h2>\n\r<p class=\"p_Normal\">檢閱已配置設定的摘要，並按一下 <span class=\"f_UI\">[完成]<\/span>。現在已建立用戶端工作，並將開啟小視窗：<\/p>\n\r<p class=\"p_NormalList\" style=\"text-indent: 0; page-break-inside: avoid; page-break-after: avoid; padding-left: 13px; margin-left: 19px;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span><span class=\"f_NormalList\">按一下 <a href=\"admin_ct_executions_trigger.html\" class=\"topiclink\">[建立觸發程序]<\/a> (建議) 以指定用戶端工作目標 (電腦或群組) 和觸發程序。<\/span><\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 32px; margin-left: 0;\"><span class=\"f_NormalList\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span>如果您按一下 <span class=\"f_UI\">[關閉]<\/span>，可以稍後建立<a href=\"admin_ct_executions_trigger.html\" class=\"topiclink\">觸發<\/a>：按一下用戶端工作，然後從下拉式功能表中選取 <img alt=\"執行於...\" title=\"執行於...\" width=\"16\" height=\"16\" style=\"margin:0;width:16px;height:16px;border:none\" src=\".\/images\/restart_default.png\"\/> <span class=\"f_UI\">[執行於]<\/span>。<\/p>\n\r<p class=\"p_Normal\"><img alt=\"建立觸發程序。\" title=\"建立觸發程序。\" width=\"480\" height=\"155\" style=\"margin:0;width:480px;height:155px;border:none\" src=\".\/images\/client_task_finish.png\"\/><\/p>\n\r<p class=\"p_Normal\">在<span class=\"f_UI\">工作<\/span>中，您可以看到<a href=\"admin_ct_executions_progress.html\" class=\"topiclink\">進度指示器欄<\/a>、<a href=\"admin_ct_executions_status_icon.html\" class=\"topiclink\">狀態圖示<\/a>以及每個已建立工作的<a href=\"admin_ct_executions_drill_down.html\" class=\"topiclink\">詳細資訊<\/a>。<\/p>\n\r<h2 class=\"p_Heading2\" style=\"page-break-after: avoid;\"><span class=\"f_Heading2\">檢查「執行命令」工作輸出<\/span><\/h2>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">1.<\/span>按一下 <span class=\"f_UI\">[工作]<\/span> &gt; 按一下工作 &gt; <span class=\"f_UI\">[顯示詳細資訊]<\/span> &gt; <span class=\"f_UI\">[執行]<\/span> 索引標籤 &gt; 按一下表格 &gt; <img alt=\"歷程\" title=\"歷程\" width=\"16\" height=\"16\" style=\"margin:0;width:16px;height:16px;border:none\" src=\".\/images\/icon_history.png\"\/> <span class=\"f_UI\">[歷程]<\/span> 中的一行。<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">2.<\/span><span class=\"f_UI\">[追蹤訊息]<\/span> 欄包含「執行命令」工作輸出的第一個 255 字元。您可以從多台電腦建立報告並處理此資料。您可以在電腦 <span class=\"f_UI\">[詳細資料]<\/span> &gt; <span class=\"f_UI\">[防護記錄]<\/span> &gt; <a href=\"computer_details.html#logs\" class=\"topiclink\">[Log Collector]<\/a> 中下載較大的輸出作為 Log Collector 防護記錄。<\/p>"
})
