title: How to get trigger details associated with a task in task scheduler from powershell
body: <p>So, basically i need to get the trigger details associated with a task which is created in task scheduler.
  <a href="https://i.stack.imgur.com/XI2qW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XI2qW.png" alt="enter image description here"></a></p>
  
  <p>So, basically I want these information which i am going to be set in this trigger window such as its daily or weekly and repeat task duration as well as for a duration of etc.</p>
  
  <p>Right now am able to get following information.</p>
  
  <pre><code>Name            : LastTaskResult
  Value           : 0
  CimType         : UInt32
  Flags           : Property, ReadOnly, NotModified
  IsValueModified : False
  
  Name            : NextRunTime
  Value           : 23-09-2015 11:26:56
  CimType         : DateTime
  Flags           : Property, ReadOnly, NotModified
  IsValueModified : False
  
  Name            : NumberOfMissedRuns
  Value           : 0
  CimType         : UInt32
  Flags           : Property, ReadOnly, NotModified
  IsValueModified : False
  
  Name            : TaskName
  Value           : test_Task
  CimType         : String
  Flags           : Property, Key, NotModified
  IsValueModified : False
  
  Name            : TaskPath
  Value           : 
  CimType         : String
  Flags           : Property, Key, NotModified, NullValue
  IsValueModified : False
  </code></pre>
  
  <p>So, basically my requirement is i have two servers. One is primary and other one is backup. I have scheduled the tasks in primary servers and periodically mirroring(robocopy) these tasks to backup server which works absolutely fine.</p>
  
  <p>But when i change the trigger details or arguments in action tab it does not appear in backup server as i am just checking the task name is already present or not in backup server, if not am creating those tasks.</p>
  
  <p>So is there any way to check the details regarding trigger(Daily or weekly etc, repetition details) or action(script and argument details) so that i can update the tasks accordingly in my seconadary server.</p>