I'm using xComputerManagement 3.2.0.0, attempting to disable the default task ScheduledDefrag
I've tried populating all of the current values for the task, only changing Enable to $false and ScheduleType to 'Once'.
Here is the configuration and error thrown:
{
ActionArguments = '-c -h -k -g -$'
ActionExecutable = '%windir%\system32\defrag.exe'
AllowStartIfOnBatteries = $false
Compatibility = 'Win8'
Description = 'This task optimizes local storage drives.'
DisallowDemandStart = $false
DisallowHardTerminate = $false
DisallowStartOnRemoteAppSession = $false
DontStopIfGoingOnBatteries = $false
DontStopOnIdleEnd = $false
Enable = $false
Ensure = 'Present'
ExecutionTimeLimit = '3.00:00:00'
Hidden = $false
IdleDuration = '00:00:00'
IdleWaitTimeout = '00:00:00'
LogonType = 'ServiceAccount'
MultipleInstances = 'IgnoreNew'
Priority = '7'
RandomDelay = '00:00:00'
RepeatInterval = '00:00:00'
RepetitionDuration = 'Indefinitely'
RestartCount = '0'
RestartInterval = '00:00:00'
RestartOnIdle = $false
RunLevel = 'Highest'
RunOnlyIfIdle = $false
RunOnlyIfNetworkAvailable = $false
ScheduleType = 'Once'
StartTime = '1/28/2018 12:00:00 AM'
TaskName = 'ScheduledDefrag'
TaskPath = '\Microsoft\Windows\Defrag\'
User = 'SYSTEM'
WakeToRun = $false
}
VERBOSE: [ADM3]: LCM: [ End Test ] [[xScheduledTask]DisableScheduledDefragTask] in 0.4430 seconds.
PowerShell DSC resource MSFT_xScheduledTask failed to execute Test-TargetResource functionality with error message: Trigger type not recognized.
Parameter name: CimClassName
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost```
I'm using xComputerManagement 3.2.0.0, attempting to disable the default task ScheduledDefrag
I've tried populating all of the current values for the task, only changing Enable to $false and ScheduleType to 'Once'.
Here is the configuration and error thrown: