Share via


Modify and Remove Assessment Tasks - Microsoft Engage Center (Services Hub)

This page will give you more information about Modifying and Removing On-Demand Assessment Tasks.

Modify existing Assessment Tasks

How to change/update credentials used by the scheduled task to run an Assessment?

Go to Task properties and select Change User or Group under security Options.

Task Properties for Change Users or Group.

How to update existing scheduled task to use gMSA?

Retrieve the scheduled task name.

Get-ScheduledTask -TaskPath '\Microsoft\Operations Management Suite\*'

Update the following code with the scheduled task and gMSA name.

$Principal = New-ScheduledTaskPrincipal -UserId ad\adsecgmsa$ -LogonType Password
$Path = (Get-ScheduledTask ADSecurityAssessment).TaskPath
$Trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Saturday -At 05:00
Set-ScheduledTask -TaskPath $Path -TaskName ADSecurityAssessment -Trigger $Trigger -Principal $Principal

gMSA scheduled task update.

How to change/update Target SQL Servers, Window Servers or Windows Clients provided while setting up SQL Server Assessment, Windows Server Assessment or Windows Client Assessment respectively?

Go to Task properties and select Action pane. Get the working directory path and find the run.cmd file location.

Task Properties Actions for Task Properties Action pane.

Edit run.cmd in notepad and save the file.

Task Properties run.cmd file in view.

Remove existing Assessment Tasks

How to change/update Log Analytics workspace to be used while running assessments in Microsoft Monitoring Agent in data collector machine?

Before directly changing or updating the Log Analytics workspace id in Microsoft Monitoring Agent control panel in data collector machine, remove existing Assessment tasks using steps below:

  1. Check the current Assessment execution status by checking OMSAssessment.exe process in Task Manager or using get-process command in PowerShell. If you see process shown as running, we need to manually stop or kill the process.

  2. Run Remove-ADAssessmentTask PowerShell command in data collection machine to remove the Assessment task. Here, ADAssessment Task is an example.

    After you run the command,

    • Check if the ADAssessment task item still exists in the Task Scheduler's list. If yes, delete it manually.
    • Check if the ADAssessment folder is present in the registry in below location. If yes, delete it manually HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HealthService\Parameters\Management Groups\AOI-\<workspace ID\>\Solutions\<Assessment>
  3. Change or update Log Analytics workspace id in Microsoft Monitoring Agent control panel in data collector machine.

  4. Re-Add the assessment using Add-ADAssessmentTask PowerShell command in data collection machine. Here ADAssessment Task is an example.