針對 Service Manager 工作的電腦問題進行疑難排解Troubleshoot computer problems with Service Manager tasks

重要

此版本的 Service Manager 已達到終止支援,建議您 升級至 Service Manager 2019This version of Service Manager has reached the end of support, we recommend you to upgrade to Service Manager 2019.

如果要在發生問題的遠端電腦上檢視記錄,您必須先建立開啟 [事件檢視器] 的工作。If you want to view the logs on a remote computer that is exhibiting problems, you must first create a task that opens Event Viewer. [事件檢視器] 會從遠端電腦讀取記錄。Event Viewer reads logs from remote computers.

在 Service Manager 中,系統管理員可以建立及使用工作,將冗長、複雜或重複性的程式自動化並加以簡化。In Service Manager, administrators can create and use tasks to automate and simplify lengthy, complex, or repetitive processes. 操作員通常會使用工作以協助使用者事件的疑難排解。Operators typically use tasks to help troubleshoot user incidents. 建立工作之後,操作員可以直接從 Service Manager 主控台執行工作。After creating a task, operators can run the task directly from the Service Manager console.

重要

若要建立工作,登入的使用者必須具有系統管理認證。To create a task, the logged-on user must have administrative credentials.

您所建立的 [事件檢視器] 工作將會顯示事件中識別為設定項目之電腦的記錄。The Event Viewer task that you create will display logs from the computer that is identified as a configuration item in the incident. 然後,服務中心分析師可以在 Service Manager 主控台中選取事件,然後針對與該事件相關的電腦執行此工作。The help desk analyst can then select an incident in the Service Manager console and run this task for the computers that are related to the incident.

建立工作Create a task

在 Service Manager 中使用下列程式建立工作(例如,您可以用來開啟電腦上事件檢視器和查看記錄檔的工作),然後驗證新的工作。Use the following procedures in Service Manager to create a task--for example, a task that you can use to open Event Viewer and view logs on a computer--and then validate the new task. [事件檢視器] 會顯示遠端電腦的記錄檔,而這些記錄檔在事件中列為 [設定項目]。Event Viewer displays the logs from the remote computer that is listed as a Configuration Item in the incident.

若要建立工作To create a task

  1. 在 Service Manager 主控台中,按一下 [程式庫]****。In the Service Manager console, click Library.

  2. 展開 [ 程式庫 ] 窗格中的 [ 程式庫],然後選取 [ 工作]。On the Library pane, expand Library, and then select Tasks.

  3. 選取 [ 工作 ] 窗格中的 [ 建立工作]。On the Tasks pane, select Create Task.

  4. 在 [在您開始前]**** 頁面上,按 [下一步]****。On the Before You Begin page, click Next.

  5. 在 [ 一般 ] 頁面中執行下列步驟:On the General page, do the following:

    1. 在 [ 工作名稱 ] 方塊中輸入工作的名稱。In the Task name box, type a name for the task. 例如,輸入 事件檢視器For example, type Event Viewer.

      注意

      在此版本中,如果編輯並變更工作的任何內容,您必須先關閉主控台再重新開啟,才能檢視該工作。In this release, if you edit and change any of the properties of a task, you have to close and reopen the console before you can view the task.

    2. 按一下 [ 目標類別 ] 區域旁的省略號按鈕 (...) 。Next to the Target class area, click the ellipsis button (...).

    3. 在 [ 選取類別 ] 對話方塊中,按一下 [ 類別 ] 清單中的 [ 事件],然後按一下 [ 確定]。In the Choose Class dialog box, in the Class list, click Incident, and then click OK.

    4. 在 [ 管理組件 ] 清單中,確認已選取 [ Service Manager 事件管理設定程式庫 ],然後按 [ 下一步]。In the Management pack list, make sure that Service Manager Incident Management Configuration Library is selected, and then click Next.

      注意

      在此版本中,如果選取建立新管理組件的選項,必須先關閉主控台再重新開啟,才能檢視此工作。In this release, if you select the option to create a new management pack, you have to close and reopen the console before you can view this task.

  6. 在 [ 依類別顯示工作 ] 頁面上,選取將該工作將顯示於哪一個類別。On the Display Task by Category page, select the category where the task will be displayed. 例如,選取 [ 事件管理資料夾工作],然後按 [ 下一步]。For example, select Incident Management Folder Tasks, and then click Next.

  7. 在 [ 命令列 ] 頁面中執行下列步驟:On the Command Line page, do the following:

    1. 在 [ 命令的完整路徑 ] 方塊中,輸入您要對此工作執行之命令的完整路徑。In the Full path to command box, type the full path of the command you want to run with this task. 例如,輸入 %windir%\system32\eventvwr.exeFor example, type %windir%\system32\eventvwr.exe.

    2. 按一下 [ 參數 ] 區域中的 [ 插入內容]。In the Parameters area, click Insert Property.

    3. 在 [ 選取內容 ] 對話方塊中,展開 [ 相關類別 ] 清單中的 [ 事件],然後按一下 [ 與設定項目相關]。In the Select Property dialog box, in the Related classes list, expand Incident, and then click Is Related to Configuration Item.

    4. 在 [ 可用內容 ] 方塊中輸入 電腦名稱In the Available Properties box, type Computer Name.

    5. 按一下 [ Windows 電腦] 下的 [ NetBIOS 電腦名稱],然後按一下 [ 新增]。Under Windows Computer, click NetBIOS Computer Name, and then click Add.

    6. 您也可以選取 [ 在此工作執行時記錄到動作記錄 ],在工作執行時將資訊新增至事件動作記錄,然後按 [ 下一步]。Optionally, select Log in action log when this task is run to add information to the incident action log when the task runs, and then click Next.

  8. 在 [摘要] **** 頁面上,按一下 [建立] ****。On the Summary page, click Create.

  9. 確定 [ 完成 ] 頁面中出現 [ 已成功建立新工作 ],然後按一下 [ 關閉]。On the Completion page, observe that The new task was created successfully appears, and then click Close.

若要驗證新工作To validate a new task

  1. 在 Service Manager 主控台中,按一下 [ 工作專案]。In the Service Manager console, click Work Items.

  2. 依序展開 [ 工作項目 ] 窗格中的 [ 工作項目]、[ 事件管理],然後按一下 [ 所有事件]。In the Work Items pane, expand Work Items, expand Incident Management, and then click All Incidents.

  3. 在 [ 所有事件 ] 窗格中,按一下已輸入做為設定項目之電腦名稱的事件。In the All Incidents pane, click an incident for which a computer name has been entered as a configuration item.

  4. 在 [ 工作 ] 窗格中,在您於上一個步驟選取之事件的名稱下方,按一下 [ 事件檢視器]。In the Tasks pane, under the name of the incident you selected in the previous step, click Event Viewer.

  5. 注意 [事件檢視器] 是否啟動,同時顯示與該事件相關之電腦的事件。Notice that Event Viewer starts, and the events from the computer that are associated with the incident are displayed.

PowerShell 符號您可以使用 Get-scsmtask Windows PowerShell 命令來查看 Service Manager 工作。You can use the Get-SCSMTask Windows PowerShell command to view Service Manager tasks.

從事件檢視執行工作Run a task from an incident view

使用下列程式,從 Service Manager 中的事件檢視執行工作,例如偵測工作。Use the following procedure to run a task, such as the Ping task, from an Incident view in Service Manager.

若要從事件檢視執行工作To run a task from an Incident view

  1. 在 Service Manager 主控台中,按一下 [ 工作專案],然後選取 [任何事件管理檢視]。In the Service Manager console, click Work Items, and then select any Incident Management view. 在 [ 工作] 窗格 中選取事件,並請注意,在 [工作] 窗格的 [ 事件名稱] 下,[ 偵測相關電腦 ] 工作隨即出現。Select an incident in the view, and notice that in the Tasks pane, under Incident Name, the Ping Related Computer task appears.

  2. 在 [工作] 窗格中,按一下要執行的工作。In the Tasks pane, click the task to run it. 例如, 偵測相關電腦For example, Ping Related Computer. 如果電腦與事件不具關聯性,您必須指定執行工作的電腦名稱。If a computer is not associated with the incident, you must specify the name of the computer to run the task on. 如果有一部以上的電腦與事件相關聯,請選擇一部電腦來執行工作。If more than one computer is associated with an incident, choose one computer to run the task on.

  3. 如果工作將動作記錄到動作記錄中,您可以開啟該事件並檢視動作記錄,以查看該工作所產生的輸出。If the task logs actions into the action log, you can open the incident and view the action log to see the output that the task generated.

  4. 如果出現 [ 主控台工作輸出-工作 名稱 ] 方塊,請確認工作所產生的輸出,然後按一下 [ 關閉]。If the Console Task Output - Task Name box appears, verify the output generated by the task, and then click Close.

後續步驟Next steps