Created
March 28, 2018 06:26
-
-
Save Iristyle/8a6e6f247a5d28d70ccd7aae889666fb to your computer and use it in GitHub Desktop.
Get scheduled tasks with compat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ScheduledTask | % { | |
$props = [ordered]@{ | |
TaskName = $psitem.TaskName | |
# note ErrorAction Ignore needed to prevent conversion problems | |
Compatibility = $psitem | Select -ExpandProperty Settings | Select -ExpandProperty Compatibility -ErrorAction Ignore | |
} | |
New-Object -TypeName PSObject -Property $props | |
} |
C:\Users\glenn.sarti> Get-ScheduledTask -TaskName 'Dell SupportAssistAgent AutoUpdate' | Select TaskName, @{Name="CompatInt";Expression={[int]$_.
Settings.Compatibility}}, @{Name="Compat";Expression={$_.Settings.Compatibility}}
TaskName CompatInt Compat
-------- --------- ------
Dell SupportAssistAgent AutoUpdate 0
Answered the question about compatibility by looking at latest taskschd.h
from Windows 10 SDK 10.0.17134.0
- see https://gist.github.com/Iristyle/ccf04cf085c43a72b7a57823319ebf53#file-taskschd-h-L828-L838
typedef
enum _TASK_COMPATIBILITY
{
TASK_COMPATIBILITY_AT = 0,
TASK_COMPATIBILITY_V1 = 1,
TASK_COMPATIBILITY_V2 = 2,
TASK_COMPATIBILITY_V2_1 = 3,
TASK_COMPATIBILITY_V2_2 = 4,
TASK_COMPATIBILITY_V2_3 = 5,
TASK_COMPATIBILITY_V2_4 = 6
} TASK_COMPATIBILITY;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windows 10 1709