dsccommunity / dsccommunity/ComputerManagementDsc
ScheduledTask - Cannot disable "Microsoft Compatibility Appraiser"
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 338
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Details of the scenario you tried and the problem that is occurring
Trying to disable "Microsoft Compatibility Appraiser" Schedule task generates an error.
Verbose logs showing the problem
VERBOSE: [servername]: [[ScheduledTask]DisableMicrosoftCompatibilityAppraiser] Disabling
existing scheduled task 'Microsoft Compatibility Appraiser' in '\Microsoft\Windows\Application Experience'.
The parameter is incorrect.
+ CategoryInfo : InvalidArgument: (PS_ScheduledTask:) [], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070057,Register-ScheduledTask
+ PSComputerName : localhost
VERBOSE: [servername]: LCM: [ End Set ] [[ScheduledTask]DisableMicrosoftCompatibilityAppraiser] in 0.7970
seconds.
Suggested solution to the issue
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
Configuration SchdTaskTest
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -ModuleName ComputerManagementDsc
Node localhost
{
ScheduledTask DisableMicrosoftCompatibilityAppraiser
{
TaskName = 'Microsoft Compatibility Appraiser'
TaskPath = '\Microsoft\Windows\Application Experience\'
Enable = $false
}
ScheduledTask DisableSchdTaskApplicationExperienceProgramDataUpdator
{
TaskName = 'ProgramDataUpdater'
TaskPath = '\Microsoft\Windows\Application Experience\'
Enable = $false
}
}
}
SchdTaskTest
The operating system the target node is running
OsName: Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU: DatacenterServerEdition
OsArchitecture: 64-bit
WindowsBuildLabEx: 14393.3442.amd64fre.rs1_release.191219-1727
OsLanguage: en-US
OsMuiLanguages: {en-US, en-GB}
Version and build of PowerShell the target node is running
PSVersion 5.1.14393.3383
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3383
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used ('dev' if using current dev branch)
ComputerManagementDsc 7.1.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the SchdTaskTest configuration on the reported Windows Server 2016 environment, starting with the ScheduledTask resource and its verbose output for DisableMicrosoftCompatibilityAppraiser. Compare the failing Microsoft Compatibility Appraiser task with the ProgramDataUpdater task in the same path. Done means the compatibility task can be disabled without the parameter error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100