You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the definition of the windows_task resource, it uses schtasks instead of Powershell so if our system isn't in English, the parsed attributes become unusable :
For example, on my French system, the partial command looks like :
PS C:\Users\my_user> schtasks /query /v /fo csv /tn '\my\task\path'|ConvertFrom-Csv
Nom de l'hôte : my-host-nameNom de la tâche : \my\task\pathProchaine exécution : RedactedStatut : RedactedMode d'ouverture de session : Redacted
Heure de la dernière exécution : Redacted
Dernier résultat : Redacted
Auteur : Redacted
Tâche à exécuter : Redacted
Démarrer dans : Redacted
Commentaire : Redacted
Statut de la tâche planifiée : Redacted
Durée d'inactivité : RedactedGestion de l'alimentation : Redacted
Exécuter en tant qu'utilisateur : RedactedSupprimer la tâche si elle n'est pas replanifiée : Redacted
Arrêter la tâche après X heures et X minutes : Redacted
Planification : Redacted
Type de planification : Redacted
Heure de début : Redacted
Date de début : Redacted
Date de fin : Redacted
Jours : Redacted
Mois : Redacted
Répéter : Chaque : Redacted
Répéter : Jusqu'à : Heure : RedactedRépétition : pendant une durée donnée : RedactedRépétition : arrêter si l'exécution est toujours en cours : Redacted
You can clearly that attributes names do not match Inspec ones at all. If I continue executing the command, just trying to get the scheduled task URI then nothing appears.
So my scheduled task exists but Inspec can't see it because of the used command.
Possible Solution
Maybe use Get-ScheduledTask instead of schtasks to be more portable.
Reading the code, apparently this solution was already present before but was removed to be backward compatible. I can't think of any alternatives with the actual method.
The text was updated successfully, but these errors were encountered:
Describe the problem
In the definition of the windows_task resource, it uses
schtasks
instead of Powershell so if our system isn't in English, the parsed attributes become unusable :For example, on my French system, the partial command looks like :
You can clearly that attributes names do not match Inspec ones at all. If I continue executing the command, just trying to get the scheduled task URI then nothing appears.
So my scheduled task exists but Inspec can't see it because of the used command.
Possible Solution
Maybe use
Get-ScheduledTask
instead ofschtasks
to be more portable.Reading the code, apparently this solution was already present before but was removed to be backward compatible. I can't think of any alternatives with the actual method.
The text was updated successfully, but these errors were encountered: